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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user