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

Commit 7fc37a37 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Skip marking recents as pending top if it is already on top" into...

Merge "Skip marking recents as pending top if it is already on top" into sc-dev am: 0c94b529 am: 72c1fe68

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15259271

Change-Id: Ic7ceec47acffdcb8ea9394509bd5a365433b88ee
parents 955c9276 72c1fe68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -952,7 +952,8 @@ public class RecentsAnimationController implements DeathRecipient {
                        "cleanupAnimation(): Notify animation finished mPendingAnimations=%d "
                                + "reorderMode=%d",
                        mPendingAnimations.size(), reorderMode);
        if (reorderMode != REORDER_MOVE_TO_ORIGINAL_POSITION) {
        if (reorderMode != REORDER_MOVE_TO_ORIGINAL_POSITION
                && mTargetActivityRecord != mDisplayContent.topRunningActivity()) {
            // Notify the state at the beginning because the removeAnimation may notify the
            // transition is finished. This is a signal that there will be a next transition.
            mDisplayContent.mFixedRotationTransitionListener.notifyRecentsWillBeTop();
+6 −0
Original line number Diff line number Diff line
@@ -701,6 +701,12 @@ public class RecentsAnimationControllerTest extends WindowTestsBase {
        // Continue the animation (simulating a call to cleanupScreenshot())
        mController.continueDeferredCancelAnimation();
        verify(mAnimationCallbacks).onAnimationFinished(REORDER_MOVE_TO_TOP, false);

        // Assume home was moved to front so will-be-top callback should not be called.
        homeActivity.moveFocusableActivityToTop("test");
        spyOn(mDefaultDisplay.mFixedRotationTransitionListener);
        mController.cleanupAnimation(REORDER_MOVE_TO_TOP);
        verify(mDefaultDisplay.mFixedRotationTransitionListener, never()).notifyRecentsWillBeTop();
    }

    private ActivityRecord createHomeActivity() {