diff options
author | Tony Wickham <twickham@google.com> | 2021-10-27 12:35:31 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2021-12-15 05:45:43 +0000 |
commit | f540e5caa2a8f48b7a603c6ca82c0de4475dd062 (patch) | |
tree | 83de2444b4966db2f13af442ba51d531ab06bdf6 | |
parent | 3e39786ec3f35ec9297003a54f4439af7d198a36 (diff) | |
download | Launcher3-f540e5caa2a8f48b7a603c6ca82c0de4475dd062.tar.gz |
Fix testStressSwipeToOverview
- Finish recents controller to app rather than to launcher, to ensure taskbar state uses in-app configuration
- Also fix an issue when a gesture completes before onLauncherStart, which happens in 3 button mode. The error I saw in the test was:
java.lang.AssertionError: http://go/tapl test failure: Failed to receive an event for the state change: expected [Overview], actual: [Background, Normal];
Context: want to switch from background to overview, clicking Recents button; now visible state is Background
(This also accurately describes what I saw on the device, where the LauncherState went to Normal but the task was still running in the live tile)
Test: testStressSwipeToOverview
Fixes: 203577620
Change-Id: I19616f7921c9821f1b45a90a3e4bec4fb3b8a9d3
Merged-In: I19616f7921c9821f1b45a90a3e4bec4fb3b8a9d3
(cherry picked from commit ce6bf7dd7f4b9977012e23b4d5554b340907cf2d)
-rw-r--r-- | quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 4 | ||||
-rw-r--r-- | quickstep/tests/src/com/android/quickstep/AbstractQuickStepTest.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index ac1772c300..9dd4c3ce0b 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -428,6 +428,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, mAnimationFactory = mActivityInterface.prepareRecentsUI(mDeviceState, mWasLauncherAlreadyVisible, this::onAnimatorPlaybackControllerCreated); maybeUpdateRecentsAttachedState(false /* animate */); + if (mGestureState.getEndTarget() != null) { + // Update the end target in case the gesture ended before we init. + mAnimationFactory.setEndTarget(mGestureState.getEndTarget()); + } }; if (mWasLauncherAlreadyVisible) { // Launcher is visible, but might be about to stop. Thus, if we prepare recents diff --git a/quickstep/tests/src/com/android/quickstep/AbstractQuickStepTest.java b/quickstep/tests/src/com/android/quickstep/AbstractQuickStepTest.java index dc73a9a51c..7c463a7b46 100644 --- a/quickstep/tests/src/com/android/quickstep/AbstractQuickStepTest.java +++ b/quickstep/tests/src/com/android/quickstep/AbstractQuickStepTest.java @@ -44,7 +44,7 @@ public abstract class AbstractQuickStepTest extends AbstractLauncherUiTest { protected void onLauncherActivityClose(Launcher launcher) { RecentsView recentsView = launcher.getOverviewPanel(); if (recentsView != null) { - recentsView.finishRecentsAnimation(true, null); + recentsView.finishRecentsAnimation(false /* toRecents */, null); } } |