Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce6bf7dd authored by Tony Wickham's avatar Tony Wickham
Browse files

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
parent d238074c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -444,6 +444,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
+1 −1
Original line number Diff line number Diff line
@@ -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);
        }
    }