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

Commit 3bf163e7 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

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

parents b7d4227b 6bb8250e
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.