Merge "TAPL: avoiding negative final coordinate of swipe-to-all apps" into ub-launcher3-qt-dev

This commit is contained in:
Vadim Tryshev
2019-05-11 00:05:50 +00:00
committed by Android (Google) Code Review
@@ -58,9 +58,13 @@ public final class Workspace extends Home {
verifyActiveContainer();
final UiObject2 hotseat = mHotseat;
final Point start = hotseat.getVisibleCenter();
start.y = hotseat.getVisibleBounds().bottom - 1;
final int swipeHeight = mLauncher.getTestInfo(
TestProtocol.REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT).
getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
LauncherInstrumentation.log(
"switchToAllApps: swipeHeight = " + swipeHeight + ", slop = "
+ mLauncher.getTouchSlop());
mLauncher.swipe(
start.x,
start.y,