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

am: e5b1f02800

* commit 'e5b1f02800d0dc8e2e2a2c9284bd0a5e5fa1a16b':
  Fixed IndexOutOfBoundsException when removing child windows
This commit is contained in:
Wale Ogunwale
2016-03-07 19:45:15 +00:00
committed by android-build-merger
2 changed files with 10 additions and 3 deletions

View File

@@ -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);
}
}
/**

View File

@@ -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) {