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

Commit 44a440e4 authored by wilsonshih's avatar wilsonshih
Browse files

Do not transfer the starting window if it is attached to client.

Once transferSplashScreen occurs, the starting window cannot be
forwarded to any other activity.

Also, fix a flicker that occurs after onSplashScreenAttachComplete.
When this callback is received, the splash screen window's animation
leash is already hidden, and the window should be removed immediately.
Therefore, clearing the leash at that moment is unnecessary and may
cause flicker because the window is still visible, keeps the leash
hidden and it will be removed automatically when the window is removed.

Flag: EXEMPT bugfix
Bug: 402644135
Test: launch Activity A which register setOnExitAnimationListener, then
launch Activity B from A, verify the splash screen window won't transfer
the B.

Change-Id: I5604603b80afd9f6e1425645414e26e0e1b93311
parent 6e14ced4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2605,7 +2605,6 @@ final class ActivityRecord extends WindowToken {
        removeTransferSplashScreenTimeout();
        // Client has draw the splash screen, so we can remove the starting window.
        if (mStartingWindow != null) {
            mStartingWindow.cancelAnimation();
            mStartingWindow.hide(false, false);
        }
        // no matter what, remove the starting window.
@@ -4487,6 +4486,10 @@ final class ActivityRecord extends WindowToken {
                return false;
            }

            if (fromActivity.mTransferringSplashScreenState != TRANSFER_SPLASH_SCREEN_IDLE) {
                return false;
            }

            // If another activity above the activity which has starting window, allows to steal the
            // starting window if the above activity isn't drawn.
            if (task.getChildCount() >= 3