From 5e58b447b0c19e646d11e0be45983cb71a043fc2 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 24 Apr 2019 17:19:07 -0700 Subject: [PATCH] Call initTransitionEndpoints in constructor Before, the soonest we initTransitionEndpoints() is in onRecentsAnimationStart(), which might be too late if launcher was killed. (In that case, the gesture might end before we ever get onRecentsAnimationStart(), and thus will never consider the distance traveled great enough to trigger recents since we don't have endpoints.) Bug: 129723135 Change-Id: I349f62244aaba8369926b14f90acd994fd40a93a --- .../src/com/android/quickstep/WindowTransformSwipeHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java index 365e171693..1577e840b8 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -276,6 +276,9 @@ public class WindowTransformSwipeHandler mMode = SysUINavigationMode.getMode(context); initStateCallbacks(); + + DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext); + initTransitionEndpoints(dp); } private void initStateCallbacks() {