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

Commit e5b1f028 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

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

am: 84828262

* commit '84828262':
  Fixed IndexOutOfBoundsException when removing child windows
parents d83f4fc8 84828262
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) {