Skip to content

Commit 820b45c

Browse files
Justin HoAndroid (Google) Code Review
authored andcommitted
Merge "DO NOT MERGE Revert "Fix issue #5823276: home repaints after full-screen app is exited"" into ics-mr1
2 parents 4e55253 + 170997a commit 820b45c

File tree

4 files changed

+17
-36
lines changed

4 files changed

+17
-36
lines changed

core/java/android/view/WindowManagerPolicy.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,6 @@ public void computeFrameLw(Rect parentFrame, Rect displayFrame,
297297
*/
298298
boolean isDisplayedLw();
299299

300-
/**
301-
* Is this window considered to be gone for purposes of layout?
302-
*/
303-
boolean isGoneForLayoutLw();
304-
305300
/**
306301
* Returns true if this window has been shown on screen at some time in
307302
* the past. Must be called with the window manager lock held.

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ public void animatingWindowLw(WindowState win,
23362336
if (DEBUG_LAYOUT) Slog.i(TAG, "Win " + win + ": isVisibleOrBehindKeyguardLw="
23372337
+ win.isVisibleOrBehindKeyguardLw());
23382338
if (mTopFullscreenOpaqueWindowState == null &&
2339-
win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {
2339+
win.isVisibleOrBehindKeyguardLw()) {
23402340
if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
23412341
mForceStatusBar = true;
23422342
}
@@ -2391,7 +2391,7 @@ public int finishAnimationLw() {
23912391
// case though.
23922392
if (topIsFullscreen) {
23932393
if (mStatusBarCanHide) {
2394-
if (DEBUG_LAYOUT) Log.v(TAG, "** HIDING status bar");
2394+
if (DEBUG_LAYOUT) Log.v(TAG, "Hiding status bar");
23952395
if (mStatusBar.hideLw(true)) {
23962396
changes |= FINISH_LAYOUT_REDO_LAYOUT;
23972397

@@ -2407,7 +2407,7 @@ public int finishAnimationLw() {
24072407
Log.v(TAG, "Preventing status bar from hiding by policy");
24082408
}
24092409
} else {
2410-
if (DEBUG_LAYOUT) Log.v(TAG, "** SHOWING status bar: top is not fullscreen");
2410+
if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar: top is not fullscreen");
24112411
if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT;
24122412
}
24132413
}

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7391,11 +7391,8 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
73917391
final int N = mWindows.size();
73927392
int i;
73937393

7394-
if (DEBUG_LAYOUT) {
7395-
Slog.v(TAG, "-------------------------------------");
7396-
Slog.v(TAG, "performLayout: needed="
7397-
+ mLayoutNeeded + " dw=" + dw + " dh=" + dh);
7398-
}
7394+
if (DEBUG_LAYOUT) Slog.v(TAG, "performLayout: needed="
7395+
+ mLayoutNeeded + " dw=" + dw + " dh=" + dh);
73997396

74007397
mPolicy.beginLayoutLw(dw, dh, mRotation);
74017398

@@ -7412,20 +7409,19 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74127409
// Don't do layout of a window if it is not visible, or
74137410
// soon won't be visible, to avoid wasting time and funky
74147411
// changes while a window is animating away.
7415-
final boolean gone = win.isGoneForLayoutLw();
7412+
final AppWindowToken atoken = win.mAppToken;
7413+
final boolean gone = win.mViewVisibility == View.GONE
7414+
|| !win.mRelayoutCalled
7415+
|| (atoken == null && win.mRootToken.hidden)
7416+
|| (atoken != null && atoken.hiddenRequested)
7417+
|| win.mAttachedHidden
7418+
|| win.mExiting || win.mDestroying;
74167419

74177420
if (DEBUG_LAYOUT && !win.mLayoutAttached) {
7418-
Slog.v(TAG, "1ST PASS " + win
7421+
Slog.v(TAG, "First pass " + win
74197422
+ ": gone=" + gone + " mHaveFrame=" + win.mHaveFrame
74207423
+ " mLayoutAttached=" + win.mLayoutAttached);
7421-
final AppWindowToken atoken = win.mAppToken;
7422-
if (gone) Slog.v(TAG, " GONE: mViewVisibility="
7423-
+ win.mViewVisibility + " mRelayoutCalled="
7424-
+ win.mRelayoutCalled + " hidden="
7425-
+ win.mRootToken.hidden + " hiddenRequested="
7426-
+ (atoken != null && atoken.hiddenRequested)
7427-
+ " mAttachedHidden=" + win.mAttachedHidden);
7428-
else Slog.v(TAG, " VIS: mViewVisibility="
7424+
if (gone) Slog.v(TAG, " (mViewVisibility="
74297425
+ win.mViewVisibility + " mRelayoutCalled="
74307426
+ win.mRelayoutCalled + " hidden="
74317427
+ win.mRootToken.hidden + " hiddenRequested="
@@ -7447,7 +7443,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74477443
win.prelayout();
74487444
mPolicy.layoutWindowLw(win, win.mAttrs, null);
74497445
win.mLayoutSeq = seq;
7450-
if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame="
7446+
if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
74517447
+ win.mFrame + " mContainingFrame="
74527448
+ win.mContainingFrame + " mDisplayFrame="
74537449
+ win.mDisplayFrame);
@@ -7465,7 +7461,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74657461
WindowState win = mWindows.get(i);
74667462

74677463
if (win.mLayoutAttached) {
7468-
if (DEBUG_LAYOUT) Slog.v(TAG, "2ND PASS " + win
7464+
if (DEBUG_LAYOUT) Slog.v(TAG, "Second pass " + win
74697465
+ " mHaveFrame=" + win.mHaveFrame
74707466
+ " mViewVisibility=" + win.mViewVisibility
74717467
+ " mRelayoutCalled=" + win.mRelayoutCalled);
@@ -7483,7 +7479,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74837479
win.prelayout();
74847480
mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
74857481
win.mLayoutSeq = seq;
7486-
if (DEBUG_LAYOUT) Slog.v(TAG, " LAYOUT: mFrame="
7482+
if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
74877483
+ win.mFrame + " mContainingFrame="
74887484
+ win.mContainingFrame + " mDisplayFrame="
74897485
+ win.mDisplayFrame);

services/java/com/android/server/wm/WindowState.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,16 +1444,6 @@ public boolean isDisplayedLw() {
14441444
|| mAnimating);
14451445
}
14461446

1447-
public boolean isGoneForLayoutLw() {
1448-
final AppWindowToken atoken = mAppToken;
1449-
return mViewVisibility == View.GONE
1450-
|| !mRelayoutCalled
1451-
|| (atoken == null && mRootToken.hidden)
1452-
|| (atoken != null && (atoken.hiddenRequested || atoken.hidden))
1453-
|| mAttachedHidden
1454-
|| mExiting || mDestroying;
1455-
}
1456-
14571447
/**
14581448
* Returns true if the window has a surface that it has drawn a
14591449
* complete UI in to.

0 commit comments

Comments
 (0)