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

Commit 23d9dcdd authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Allow to transfer starting window from dying activity" into sc-v2-dev am: a0eaed87

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15430795

Change-Id: I8871f32050a86658568e7a3c6af8fa0fd54fa8e7
parents c95cc393 a0eaed87
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3669,6 +3669,16 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
        cleanUp(true /* cleanServices */, true /* setState */);
        if (remove) {
            if (mStartingData != null && mVisible && task != null) {
                // A corner case that the app terminates its trampoline activity on a separated
                // process by killing itself. Transfer the starting window to the next activity
                // which will be visible, so the dead activity can be removed immediately (no
                // longer animating) and the reveal animation can play normally on next activity.
                final ActivityRecord top = task.topRunningActivity();
                if (top != null && !top.mVisible && top.shouldBeVisible()) {
                    top.transferStartingWindow(this);
                }
            }
            removeFromHistory("appDied");
        }
    }