summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Craig Mautner <cmautner@google.com> 2014-10-23 13:16:53 -0700
committer Craig Mautner <cmautner@google.com> 2014-10-27 14:46:27 -0700
commitfa3515bd0d62bc55153f26cd9f0b93e077631514 (patch)
tree1018b38784c5dae4995de3b21107672f55d6f82b
parenta9a550dd8e87b33979670cf856838ba227500547 (diff)
Do not go through a layout if visibility is GONE
An unnecessary layout based on dimensions changing catches up with us later when the next layout doesn't occur. In this case we layed out the Settings panel because visibility changed from visible to GONE and the requested width/height didn't match the current window width height. When the visibility changed back to visible the dimensions matched and another layout was not performed. This fix delays the layout until the window becomes visible again. Fixes bug 17681754. Change-Id: I0a3ff9479dca93e78c5d3a3df40faceffc10ecbd
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index f82aee4d1e23..527ae47d439a 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2980,8 +2980,8 @@ public class WindowManagerService extends IWindowManager.Stub
return 0;
}
WindowStateAnimator winAnimator = win.mWinAnimator;
- if (win.mRequestedWidth != requestedWidth
- || win.mRequestedHeight != requestedHeight) {
+ if (viewVisibility != View.GONE && (win.mRequestedWidth != requestedWidth
+ || win.mRequestedHeight != requestedHeight)) {
win.mLayoutNeeded = true;
win.mRequestedWidth = requestedWidth;
win.mRequestedHeight = requestedHeight;