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

Commit db53c383 authored by wilsonshih's avatar wilsonshih
Browse files

Fix app crash from transfer splash screen view during relaunch

Client side window will be removed during relaunch, which unable to
handle transfer splash screen view. Do not schedule to transfer splash
screen view while relaunch.

Flag: EXEMPT Bugfix
Bug: 361840719
Test: try launch test app which won't handle configuration change
multiple times, verify no more crash happen.

Change-Id: Idef4d4eda9ca1d4af9ce4ff03e6e8d7054347c70
parent 1e51e198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4583,7 +4583,7 @@ public final class ActivityThread extends ClientTransactionHandler
    public void handleAttachSplashScreenView(@NonNull ActivityClientRecord r,
            @Nullable SplashScreenView.SplashScreenViewParcelable parcelable,
            @NonNull SurfaceControl startingWindowLeash) {
        final DecorView decorView = (DecorView) r.window.peekDecorView();
        final DecorView decorView = r.window != null ? (DecorView) r.window.peekDecorView() : null;
        if (parcelable != null && decorView != null) {
            createSplashScreen(r, decorView, parcelable, startingWindowLeash);
        } else {
+2 −1
Original line number Diff line number Diff line
@@ -2620,7 +2620,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                || mStartingWindow == null
                || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH
                // skip copy splash screen to client if it was resized
                || (mStartingData != null && mStartingData.mResizedFromTransfer)) {
                || (mStartingData != null && mStartingData.mResizedFromTransfer)
                || isRelaunching()) {
            return false;
        }
        if (isTransferringSplashScreen()) {