Merge "Fix: WindowManagerGlobal#setStoppedState failed by IOOBE" am: 4741faa258

am: 949ea9bb2a

Change-Id: I8bc04464519557a7af8e4792f30bad901d206052
This commit is contained in:
Tetsutoki Shiozawa
2017-11-10 17:06:04 +00:00
committed by android-build-merger

View File

@@ -605,9 +605,10 @@ public final class WindowManagerGlobal {
public void setStoppedState(IBinder token, boolean stopped) {
synchronized (mLock) {
int count = mViews.size();
for (int i = 0; i < count; i++) {
for (int i = count - 1; i >= 0; i--) {
if (token == null || mParams.get(i).token == token) {
ViewRootImpl root = mRoots.get(i);
// Client might remove the view by "stopped" event.
root.setWindowStopped(stopped);
}
}