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

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

Merge "Attemp to fix an NPE while transferStartingWindow."

parents 67f1f5ab eadfad43
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4007,6 +4007,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    private boolean transferStartingWindow(@NonNull ActivityRecord fromActivity) {
        final WindowState tStartingWindow = fromActivity.mStartingWindow;
        if (tStartingWindow != null && fromActivity.mStartingSurface != null) {
            if (tStartingWindow.getParent() == null) {
                // The window has been detached from the parent, so the window cannot be transfer
                // to another activity because it may be in the remove process.
                // Don't need to remove the starting window at this point because that will happen
                // at #postWindowRemoveCleanupLocked
                return false;
            }
            // In this case, the starting icon has already been displayed, so start
            // letting windows get shown immediately without any more transitions.
            if (fromActivity.mVisible) {