Merge "Fix: WindowManagerGlobal#setStoppedState failed by IOOBE"

am: 4741faa258

Change-Id: Ifc79d7ccd5d6837a39263b6ba9728f8b4d82f81d
This commit is contained in:
Tetsutoki Shiozawa
2017-11-10 16:57:22 +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);
}
}