From a04e746e84f918fd5e6d4fa2cda7b60d90462cf0 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 31 May 2019 13:33:00 -0700 Subject: 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 --- go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go') diff --git a/go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java b/go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java index 8b6f8bcfe..2db8b39d9 100644 --- a/go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java +++ b/go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java @@ -29,7 +29,7 @@ public abstract class GoActivityControlHelper im } @Override - public void onSwipeUpComplete(T activity) { + public void onSwipeUpToRecentsComplete(T activity) { // Go does not support swipe up gesture. } -- cgit v1.2.3