summaryrefslogtreecommitdiff
path: root/android/view/WindowManagerGlobal.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/view/WindowManagerGlobal.java')
-rw-r--r--android/view/WindowManagerGlobal.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/view/WindowManagerGlobal.java b/android/view/WindowManagerGlobal.java
index c7e8dee3..cca66d6b 100644
--- a/android/view/WindowManagerGlobal.java
+++ b/android/view/WindowManagerGlobal.java
@@ -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);
}
}