Merge "Better diags in ensureWorkspaceIsScrollable" into ub-launcher3-qt-dev

am: d4eed0b191

Change-Id: I7f4f8f07ae556820575a2451d4b038cefad4ae15
This commit is contained in:
Vadim Tryshev authored and android-build-merger committed 2019-04-15 12:02:46 -07:00
commit 275aa73e40
1 file changed
+10 -6
@@ -114,12 +114,16 @@ public final class Workspace extends Home {
public void ensureWorkspaceIsScrollable() {
final UiObject2 workspace = verifyActiveContainer();
if (!isWorkspaceScrollable(workspace)) {
dragIconToWorkspace(
mLauncher,
getHotseatAppIcon("Chrome"),
new Point(mLauncher.getDevice().getDisplayWidth(),
workspace.getVisibleBounds().centerY()), "deep_shortcuts_container");
verifyActiveContainer();
try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
"dragging icon to a second page of workspace to make it scrollable")) {
dragIconToWorkspace(
mLauncher,
getHotseatAppIcon("Chrome"),
new Point(mLauncher.getDevice().getDisplayWidth(),
workspace.getVisibleBounds().centerY()),
"deep_shortcuts_container");
verifyActiveContainer();
}
}
assertTrue("Home screen workspace didn't become scrollable",
isWorkspaceScrollable(workspace));