diff options
author | Tony Wickham <twickham@google.com> | 2019-05-31 13:33:00 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2019-05-31 16:11:40 -0700 |
commit | a04e746e84f918fd5e6d4fa2cda7b60d90462cf0 (patch) | |
tree | 966cd15bcde650ff79889018aa1647c08091036f /quickstep/src | |
parent | 164ebb2e8c15ba6b21bac943490fe8c5127d230b (diff) | |
download | android_packages_apps_Trebuchet-a04e746e84f918fd5e6d4fa2cda7b60d90462cf0.tar.gz android_packages_apps_Trebuchet-a04e746e84f918fd5e6d4fa2cda7b60d90462cf0.tar.bz2 android_packages_apps_Trebuchet-a04e746e84f918fd5e6d4fa2cda7b60d90462cf0.zip |
Fix getting stuck in BackgroundAppState for 2-button mode
When ending in recents, we reapply the state - therefore, it's important
to make sure we are in OverviewState before onSwipeUpComplete(). This is
done by mLauncherTransitionController, which sets OverviewState on end.
We already force mLauncherTransitionController to end before calling
onSwipeUpComplete(), but in this case we were calling cancel() and
setting mLauncherTransitionController = null, which meant we could never
call end() on it. Instead, we should always call end() if we set it to
null.
Also ensure mLauncherTransitionController is created even if the gesture
is completed, if an existing controller isn't already running. This can
happen if you swipe up quickly enough that we get onGestureEnd before
launcher is drawn, and in that case we still want the launcher component
to animate once its ready. This is even more important for 2-button
mode, because again, we rely on mLauncherTransitionController to set the
state to OverviewState before we reapply it.
Finally, clarified some methods by renaming "swipeUp" to
"swipeUpToRecents".
Bug: 132757019
Change-Id: Ieb24a4f36a39780e5d64d7bc312791608db474d1
Diffstat (limited to 'quickstep/src')
-rw-r--r-- | quickstep/src/com/android/quickstep/ActivityControlHelper.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 279a94619..b17d8d69c 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -51,7 +51,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect); - void onSwipeUpComplete(T activity); + void onSwipeUpToRecentsComplete(T activity); void onAssistantVisibilityChanged(float visibility); |