summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-01-12 14:05:03 -0800
committerDianne Hackborn <hackbod@google.com>2012-01-12 14:05:03 -0800
commit01b02a734d2988c22b00f5df6346ad03d8bf52b6 (patch)
tree36cc4f3027585963a0db3ad33f907c28182f9fe1 /services
parentd3be0a76e46584357dbb77fcd200128d0d7dc9a8 (diff)
downloadframeworks_base-01b02a734d2988c22b00f5df6346ad03d8bf52b6.zip
frameworks_base-01b02a734d2988c22b00f5df6346ad03d8bf52b6.tar.gz
frameworks_base-01b02a734d2988c22b00f5df6346ad03d8bf52b6.tar.bz2
Fix issue #5823276: home repaints after full-screen app is exited
Don't consider a window as a candidate for the top fullscreen window if it is not going to be a candiate for layout. Also don't consider windows a candidate for layout if their app token is hidden. This fixes a transient state where we are preparing to unhide the window but have not done so yet. Change-Id: Ife5299ffa003c1df1a4f787b7a2809cbf614ec16
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java32
-rw-r--r--services/java/com/android/server/wm/WindowState.java10
2 files changed, 28 insertions, 14 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index f5c2de9..47a7e16 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -7391,8 +7391,11 @@ public class WindowManagerService extends IWindowManager.Stub
final int N = mWindows.size();
int i;
- if (DEBUG_LAYOUT) Slog.v(TAG, "performLayout: needed="
- + mLayoutNeeded + " dw=" + dw + " dh=" + dh);
+ if (DEBUG_LAYOUT) {
+ Slog.v(TAG, "-------------------------------------");
+ Slog.v(TAG, "performLayout: needed="
+ + mLayoutNeeded + " dw=" + dw + " dh=" + dh);
+ }
mPolicy.beginLayoutLw(dw, dh, mRotation);
@@ -7409,19 +7412,20 @@ public class WindowManagerService extends IWindowManager.Stub
// Don't do layout of a window if it is not visible, or
// soon won't be visible, to avoid wasting time and funky
// changes while a window is animating away.
- final AppWindowToken atoken = win.mAppToken;
- final boolean gone = win.mViewVisibility == View.GONE
- || !win.mRelayoutCalled
- || (atoken == null && win.mRootToken.hidden)
- || (atoken != null && atoken.hiddenRequested)
- || win.mAttachedHidden
- || win.mExiting || win.mDestroying;
+ final boolean gone = win.isGoneForLayoutLw();
if (DEBUG_LAYOUT && !win.mLayoutAttached) {
- Slog.v(TAG, "First pass " + win
+ Slog.v(TAG, "1ST PASS " + win
+ ": gone=" + gone + " mHaveFrame=" + win.mHaveFrame
+ " mLayoutAttached=" + win.mLayoutAttached);
- if (gone) Slog.v(TAG, " (mViewVisibility="
+ final AppWindowToken atoken = win.mAppToken;
+ if (gone) Slog.v(TAG, " GONE: mViewVisibility="
+ + win.mViewVisibility + " mRelayoutCalled="
+ + win.mRelayoutCalled + " hidden="
+ + win.mRootToken.hidden + " hiddenRequested="
+ + (atoken != null && atoken.hiddenRequested)
+ + " mAttachedHidden=" + win.mAttachedHidden);
+ else Slog.v(TAG, " VIS: mViewVisibility="
+ win.mViewVisibility + " mRelayoutCalled="
+ win.mRelayoutCalled + " hidden="
+ win.mRootToken.hidden + " hiddenRequested="
@@ -7443,7 +7447,7 @@ public class WindowManagerService extends IWindowManager.Stub
win.prelayout();
mPolicy.layoutWindowLw(win, win.mAttrs, null);
win.mLayoutSeq = seq;
- if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
+ if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame="
+ win.mFrame + " mContainingFrame="
+ win.mContainingFrame + " mDisplayFrame="
+ win.mDisplayFrame);
@@ -7461,7 +7465,7 @@ public class WindowManagerService extends IWindowManager.Stub
WindowState win = mWindows.get(i);
if (win.mLayoutAttached) {
- if (DEBUG_LAYOUT) Slog.v(TAG, "Second pass " + win
+ if (DEBUG_LAYOUT) Slog.v(TAG, "2ND PASS " + win
+ " mHaveFrame=" + win.mHaveFrame
+ " mViewVisibility=" + win.mViewVisibility
+ " mRelayoutCalled=" + win.mRelayoutCalled);
@@ -7479,7 +7483,7 @@ public class WindowManagerService extends IWindowManager.Stub
win.prelayout();
mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
win.mLayoutSeq = seq;
- if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
+ if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame="
+ win.mFrame + " mContainingFrame="
+ win.mContainingFrame + " mDisplayFrame="
+ win.mDisplayFrame);
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 75bda41..794515b 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -1444,6 +1444,16 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|| mAnimating);
}
+ public boolean isGoneForLayoutLw() {
+ final AppWindowToken atoken = mAppToken;
+ return mViewVisibility == View.GONE
+ || !mRelayoutCalled
+ || (atoken == null && mRootToken.hidden)
+ || (atoken != null && (atoken.hiddenRequested || atoken.hidden))
+ || mAttachedHidden
+ || mExiting || mDestroying;
+ }
+
/**
* Returns true if the window has a surface that it has drawn a
* complete UI in to.