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

Commit 84828262 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Fixed IndexOutOfBoundsException when removing child windows" into nyc-dev

parents b849eeab 33fde7d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -101,6 +101,10 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;

class WindowList extends ArrayList<WindowState> {
    WindowList() {}
    WindowList(WindowList windowList) {
        super(windowList);
    }
}

/**
+6 −3
Original line number Diff line number Diff line
@@ -434,9 +434,12 @@ class WindowStateAnimator {
                + " remove=" + mWin.mRemoveOnExit
                + " windowAnimating=" + isWindowAnimating());

        final int N = mWin.mChildWindows.size();
        for (int i=0; i<N; i++) {
            mWin.mChildWindows.get(i).mWinAnimator.finishExit();
        if (!mWin.mChildWindows.isEmpty()) {
            // Copying to a different list as multiple children can be removed.
            final WindowList childWindows = new WindowList(mWin.mChildWindows);
            for (int i = childWindows.size() - 1; i >= 0; i--) {
                childWindows.get(i).mWinAnimator.finishExit();
            }
        }

        if (mEnteringAnimation) {