diff options
| author | 2012-10-06 13:55:07 -0700 | |
|---|---|---|
| committer | 2012-10-06 13:55:07 -0700 | |
| commit | ade0a9a9386a2cd6f11ad3cde257c11fe300d785 (patch) | |
| tree | bf924554bf31d75bec4f398295e07123033bf9ed | |
| parent | 1ad0fd9c04ae2e352c59129b979145e662f25cbc (diff) | |
Save resized windows even if freezing.
During app freezes resized windows were being dropped if the freeze
window timed out. This fix adds windows to the list of resized
windows but does not notify the clients of the resize until freezing
is completed.
Bug: 7094175 fixed.
Change-Id: Iee1f5f532a0e661fbf900e4540146ae4b645d68e
| -rwxr-xr-x | services/java/com/android/server/wm/WindowManagerService.java | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 545d1a944782..cc847842498a 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -8725,7 +8725,7 @@ public class WindowManagerService extends IWindowManager.Stub private void updateResizingWindows(final WindowState w) { final WindowStateAnimator winAnimator = w.mWinAnimator; - if (w.mHasSurface && !w.mAppFreezing && w.mLayoutSeq == mLayoutSeq) { + if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) { w.mContentInsetsChanged |= !w.mLastContentInsets.equals(w.mContentInsets); w.mVisibleInsetsChanged |= @@ -9260,39 +9260,41 @@ public class WindowManagerService extends IWindowManager.Stub defaultDisplay.pendingLayoutChanges); } - if (!mResizingWindows.isEmpty()) { - for (i = mResizingWindows.size() - 1; i >= 0; i--) { - WindowState win = mResizingWindows.get(i); - final WindowStateAnimator winAnimator = win.mWinAnimator; - try { - if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG, - "Reporting new frame to " + win + ": " + win.mCompatFrame); - int diff = 0; - boolean configChanged = win.isConfigChanged(); - if ((DEBUG_RESIZE || DEBUG_ORIENTATION || DEBUG_CONFIGURATION - // TODO: Remove once b/7094175 is fixed - || ((String)win.mAttrs.getTitle()).contains("Keyguard")) - && configChanged) { - Slog.i(TAG, "Sending new config to window " + win + ": " - + winAnimator.mSurfaceW + "x" + winAnimator.mSurfaceH - + " / " + mCurConfiguration + " / 0x" - + Integer.toHexString(diff)); - } - win.mConfiguration = mCurConfiguration; - if (DEBUG_ORIENTATION && - winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING) Slog.i( - TAG, "Resizing " + win + " WITH DRAW PENDING"); - win.mClient.resized(win.mFrame, win.mLastContentInsets, win.mLastVisibleInsets, - winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING, - configChanged ? win.mConfiguration : null); - win.mContentInsetsChanged = false; - win.mVisibleInsetsChanged = false; - winAnimator.mSurfaceResized = false; - } catch (RemoteException e) { - win.mOrientationChanging = false; - } + for (i = mResizingWindows.size() - 1; i >= 0; i--) { + WindowState win = mResizingWindows.get(i); + if (win.mAppFreezing) { + // Don't remove this window until rotation has completed. + continue; + } + final WindowStateAnimator winAnimator = win.mWinAnimator; + try { + if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG, + "Reporting new frame to " + win + ": " + win.mCompatFrame); + int diff = 0; + boolean configChanged = win.isConfigChanged(); + if ((DEBUG_RESIZE || DEBUG_ORIENTATION || DEBUG_CONFIGURATION + // TODO: Remove once b/7094175 is fixed + || ((String)win.mAttrs.getTitle()).contains("Keyguard")) + && configChanged) { + Slog.i(TAG, "Sending new config to window " + win + ": " + + winAnimator.mSurfaceW + "x" + winAnimator.mSurfaceH + + " / " + mCurConfiguration + " / 0x" + + Integer.toHexString(diff)); + } + win.mConfiguration = mCurConfiguration; + if (DEBUG_ORIENTATION && + winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING) Slog.i( + TAG, "Resizing " + win + " WITH DRAW PENDING"); + win.mClient.resized(win.mFrame, win.mLastContentInsets, win.mLastVisibleInsets, + winAnimator.mDrawState == WindowStateAnimator.DRAW_PENDING, + configChanged ? win.mConfiguration : null); + win.mContentInsetsChanged = false; + win.mVisibleInsetsChanged = false; + winAnimator.mSurfaceResized = false; + } catch (RemoteException e) { + win.mOrientationChanging = false; } - mResizingWindows.clear(); + mResizingWindows.remove(i); } if (DEBUG_ORIENTATION && mDisplayFrozen) Slog.v(TAG, |