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

Commit 27e6bf57 authored by wilsonshih's avatar wilsonshih
Browse files

Avoid send another copy splash screen request to shell.

Once the initial splash screen view transferred to client, core should
not request another copy request from shell since the SurfacePackage
was released in shell. Add a condition in transferSplashScreenIfNeeded
to ensure there won't request copy again.

Flag: EXEMPT bugfix
Bug: 370578484
Test: atest SplashscreenTests
Change-Id: I151befb077f196167044d1138605d5ecb4716021
parent 201ec7ec
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ import static com.android.server.wm.IdentifierProto.HASH_CODE;
import static com.android.server.wm.IdentifierProto.TITLE;
import static com.android.server.wm.IdentifierProto.USER_ID;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_COPY_TO_CLIENT;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_IDLE;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_REMOVE_DIRECTLY;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_PREDICT_BACK;
@@ -2635,8 +2636,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (finishing || !mHandleExitSplashScreen || mStartingSurface == null
                || mStartingWindow == null
                || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH
                // skip copy splash screen to client if it was resized
                || (mStartingData != null && mStartingData.mResizedFromTransfer)
                // Skip copy splash screen to client if it was resized, or the starting data already
                // requested to be removed after transaction commit.
                || (mStartingData != null && (mStartingData.mResizedFromTransfer
                        || mStartingData.mRemoveAfterTransaction != AFTER_TRANSACTION_IDLE))
                || isRelaunching()) {
            return false;
        }