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

Commit 2b2395f3 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Don't wait for finishing animation when second display is disconnected" into klp-dev

parents 81e094d7 9bc5f2f4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2380,6 +2380,11 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    public void removeWindowLocked(Session session, WindowState win) {
        removeWindowLocked(session, win, false);
    }

    private void removeWindowLocked(Session session, WindowState win,
            boolean forceRemove) {
        if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
            if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "Starting window removed " + win);
            removeStartingWindowTimeout(win.mAppToken);
@@ -2430,7 +2435,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    mDisplayMagnifier.onWindowTransitionLocked(win, transit);
                }
            }
            if (win.mExiting || win.mWinAnimator.isAnimating()) {
            if (!forceRemove && (win.mExiting || win.mWinAnimator.isAnimating())) {
                // The exit animation is running... wait for it!
                //Slog.i(TAG, "*** Running exit animation...");
                win.mExiting = true;
@@ -10851,7 +10856,7 @@ public class WindowManagerService extends IWindowManager.Stub
            WindowList windows = displayContent.getWindowList();
            while (!windows.isEmpty()) {
                final WindowState win = windows.get(windows.size() - 1);
                removeWindowLocked(win.mSession, win);
                removeWindowLocked(win.mSession, win, true);
            }
        }
        mAnimator.removeDisplayLocked(displayId);