Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aab6b51c authored by Tetsutoki Shiozawa's avatar Tetsutoki Shiozawa Committed by android-build-merger
Browse files

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

am: 949ea9bb

Change-Id: I8bc04464519557a7af8e4792f30bad901d206052
parents 5401c949 949ea9bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -605,9 +605,10 @@ public final class WindowManagerGlobal {
    public void setStoppedState(IBinder token, boolean stopped) {
    public void setStoppedState(IBinder token, boolean stopped) {
        synchronized (mLock) {
        synchronized (mLock) {
            int count = mViews.size();
            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) {
                if (token == null || mParams.get(i).token == token) {
                    ViewRootImpl root = mRoots.get(i);
                    ViewRootImpl root = mRoots.get(i);
                    // Client might remove the view by "stopped" event.
                    root.setWindowStopped(stopped);
                    root.setWindowStopped(stopped);
                }
                }
            }
            }