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

Commit a1d0a65d authored by wilsonshih's avatar wilsonshih
Browse files

Preventing from re-create starting window.

Unlock device will also request to create starting window for visible
activities, if core just remove first starting window after app window
drawn, there can have a slightly timing gap to request another starting
window.
It should be much stable by modify the check condition to window type,
instead of finding local member.

Bug: 322547402
Test: after start activity on lockscreen, unlock immediately to simulate
the second create starting window request.

Change-Id: Icbc07fcf3f2c7a5fae2fc13f28f519885ae5054a
parent d26b5778
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2441,11 +2441,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            return false;
        }

        if (mStartingData != null) {
        if (hasStartingWindow()) {
            return false;
        }

        final WindowState mainWin = findMainWindow();
        final WindowState mainWin = findMainWindow(false /* includeStartingApp */);
        if (mainWin != null && mainWin.mWinAnimator.getShown()) {
            // App already has a visible window...why would you want a starting window?
            return false;