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

Commit 6bb8250e authored by Chong Zhang's avatar Chong Zhang
Browse files

Don't clear mExiting if window is going to be removed.

bug: 26819496
Change-Id: I7ab1f45f8d32bc086ded579b46b6b5e9b32771a0
parent 84867864
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -302,9 +302,14 @@ class AppWindowToken extends WindowToken {
    void setWindowsExiting(boolean exiting) {
        for (int i = allAppWindows.size() - 1; i >= 0; i--) {
            WindowState win = allAppWindows.get(i);
            // If the app already requested to remove its window, we don't modify
            // its exiting state. Otherwise the stale window won't get removed on
            // exit and could cause focus to be given to the wrong window.
            if (!(win.mRemoveOnExit && win.mExiting)) {
                win.mExiting = exiting;
            }
        }
    }

    /**
     * Checks whether we should save surfaces for this app.