diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-07-17 00:24:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-07-17 00:24:55 +0000 |
commit | 401583f9b6e8c0171747d072ecfa375be075ad97 (patch) | |
tree | f3c844a9028eaeb3a50b0bcb1f9530d33827b831 /quickstep | |
parent | f2de54b275d609db590a653051498e9310dce9cd (diff) | |
parent | 6a75e52f85c751b4b2832c312abd09e7812611e2 (diff) | |
download | android_packages_apps_Trebuchet-401583f9b6e8c0171747d072ecfa375be075ad97.tar.gz android_packages_apps_Trebuchet-401583f9b6e8c0171747d072ecfa375be075ad97.tar.bz2 android_packages_apps_Trebuchet-401583f9b6e8c0171747d072ecfa375be075ad97.zip |
Merge "Getting starting point of swipe from overview to all apps via protocol" into ub-launcher3-qt-r1-dev
Diffstat (limited to 'quickstep')
-rw-r--r-- | quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java | 7 | ||||
-rw-r--r-- | quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java index 6030cea93..109d751c4 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java @@ -51,7 +51,6 @@ import com.android.quickstep.OverviewInteractionState; import com.android.quickstep.RecentsModel; import com.android.quickstep.TouchInteractionService; import com.android.quickstep.util.LayoutUtils; -import com.android.systemui.shared.system.QuickStepContract; /** * Touch controller for handling various state transitions in portrait UI. @@ -296,9 +295,13 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr * @return true if the event is over the hotseat */ static boolean isTouchOverHotseat(Launcher launcher, MotionEvent ev) { + return (ev.getY() >= getHotseatTop(launcher)); + } + + public static int getHotseatTop(Launcher launcher) { DeviceProfile dp = launcher.getDeviceProfile(); int hotseatHeight = dp.hotseatBarSizePx + dp.getInsets().bottom; - return (ev.getY() >= (launcher.getDragLayer().getHeight() - hotseatHeight)); + return launcher.getDragLayer().getHeight() - hotseatHeight; } private static class InterpolatorWrapper implements Interpolator { diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java index b59e13362..57ed244d2 100644 --- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java @@ -6,6 +6,7 @@ import android.os.Bundle; import com.android.launcher3.testing.TestInformationHandler; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.uioverrides.states.OverviewState; +import com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController; import com.android.quickstep.util.LayoutUtils; public class QuickstepTestInformationHandler extends TestInformationHandler { @@ -34,7 +35,15 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, TouchInteractionService.isInputMonitorInitialized()); - break; + return response; + } + + case TestProtocol.REQUEST_HOTSEAT_TOP: { + if (mLauncher == null) return null; + + response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, + PortraitStatesTouchController.getHotseatTop(mLauncher)); + return response; } } |