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

Commit 98235693 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Fix app crash from transfer splash screen view during relaunch" into main

parents 3d895f4e db53c383
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4583,7 +4583,7 @@ public final class ActivityThread extends ClientTransactionHandler
    public void handleAttachSplashScreenView(@NonNull ActivityClientRecord r,
    public void handleAttachSplashScreenView(@NonNull ActivityClientRecord r,
            @Nullable SplashScreenView.SplashScreenViewParcelable parcelable,
            @Nullable SplashScreenView.SplashScreenViewParcelable parcelable,
            @NonNull SurfaceControl startingWindowLeash) {
            @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) {
        if (parcelable != null && decorView != null) {
            createSplashScreen(r, decorView, parcelable, startingWindowLeash);
            createSplashScreen(r, decorView, parcelable, startingWindowLeash);
        } else {
        } else {
+2 −1
Original line number Original line Diff line number Diff line
@@ -2619,7 +2619,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                || mStartingWindow == null
                || mStartingWindow == null
                || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH
                || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH
                // skip copy splash screen to client if it was resized
                // skip copy splash screen to client if it was resized
                || (mStartingData != null && mStartingData.mResizedFromTransfer)) {
                || (mStartingData != null && mStartingData.mResizedFromTransfer)
                || isRelaunching()) {
            return false;
            return false;
        }
        }
        if (isTransferringSplashScreen()) {
        if (isTransferringSplashScreen()) {