Adding UI tests for various bind widget flows

Change-Id: I634302051886baee6b6424f69bc95db860b4823e
This commit is contained in:
Sunny Goyal
2016-03-10 05:34:30 -08:00
parent 77b3e1a57b
commit 16466f1bbb
7 changed files with 447 additions and 11 deletions

View File

@@ -363,7 +363,7 @@ public class AppWidgetResizeFrame extends FrameLayout implements View.OnKeyListe
sTmpRect.right, sTmpRect.bottom);
}
public static Rect getWidgetSizeRanges(Launcher launcher, int spanX, int spanY, Rect rect) {
public static Rect getWidgetSizeRanges(Context context, int spanX, int spanY, Rect rect) {
if (sCellSize == null) {
InvariantDeviceProfile inv = LauncherAppState.getInstance().getInvariantDeviceProfile();
@@ -376,7 +376,7 @@ public class AppWidgetResizeFrame extends FrameLayout implements View.OnKeyListe
if (rect == null) {
rect = new Rect();
}
final float density = launcher.getResources().getDisplayMetrics().density;
final float density = context.getResources().getDisplayMetrics().density;
// Compute landscape size
int landWidth = (int) ((spanX * sCellSize[0].x) / density);