am 47163685
: Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit '47163685eb90f9520e7ae0ac0984b4e1535e8e5b': Another attempt at issue #5823276: home repaints after full-screen app is exited
This commit is contained in:
@ -2538,8 +2538,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
if (win == null) {
|
if (win == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
win.mRequestedWidth = requestedWidth;
|
if (win.mRequestedWidth != requestedWidth
|
||||||
win.mRequestedHeight = requestedHeight;
|
|| win.mRequestedHeight != requestedHeight) {
|
||||||
|
win.mLayoutNeeded = true;
|
||||||
|
win.mRequestedWidth = requestedWidth;
|
||||||
|
win.mRequestedHeight = requestedHeight;
|
||||||
|
}
|
||||||
if (attrs != null && seq == win.mSeq) {
|
if (attrs != null && seq == win.mSeq) {
|
||||||
win.mSystemUiVisibility = systemUiVisibility;
|
win.mSystemUiVisibility = systemUiVisibility;
|
||||||
}
|
}
|
||||||
@ -2560,6 +2564,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
flagChanges = win.mAttrs.flags ^= attrs.flags;
|
flagChanges = win.mAttrs.flags ^= attrs.flags;
|
||||||
attrChanges = win.mAttrs.copyFrom(attrs);
|
attrChanges = win.mAttrs.copyFrom(attrs);
|
||||||
|
if ((attrChanges&WindowManager.LayoutParams.LAYOUT_CHANGED) != 0) {
|
||||||
|
win.mLayoutNeeded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": " + win.mAttrs);
|
if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": " + win.mAttrs);
|
||||||
@ -7438,12 +7445,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// if they want. (We do the normal layout for INVISIBLE
|
// if they want. (We do the normal layout for INVISIBLE
|
||||||
// windows, since that means "perform layout as normal,
|
// windows, since that means "perform layout as normal,
|
||||||
// just don't display").
|
// just don't display").
|
||||||
if (!gone || !win.mHaveFrame) {
|
if (!gone || !win.mHaveFrame || win.mLayoutNeeded) {
|
||||||
if (!win.mLayoutAttached) {
|
if (!win.mLayoutAttached) {
|
||||||
if (initial) {
|
if (initial) {
|
||||||
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
|
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
|
||||||
win.mContentChanged = false;
|
win.mContentChanged = false;
|
||||||
}
|
}
|
||||||
|
win.mLayoutNeeded = false;
|
||||||
win.prelayout();
|
win.prelayout();
|
||||||
mPolicy.layoutWindowLw(win, win.mAttrs, null);
|
mPolicy.layoutWindowLw(win, win.mAttrs, null);
|
||||||
win.mLayoutSeq = seq;
|
win.mLayoutSeq = seq;
|
||||||
@ -7475,11 +7483,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// windows, since that means "perform layout as normal,
|
// windows, since that means "perform layout as normal,
|
||||||
// just don't display").
|
// just don't display").
|
||||||
if ((win.mViewVisibility != View.GONE && win.mRelayoutCalled)
|
if ((win.mViewVisibility != View.GONE && win.mRelayoutCalled)
|
||||||
|| !win.mHaveFrame) {
|
|| !win.mHaveFrame || win.mLayoutNeeded) {
|
||||||
if (initial) {
|
if (initial) {
|
||||||
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
|
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
|
||||||
win.mContentChanged = false;
|
win.mContentChanged = false;
|
||||||
}
|
}
|
||||||
|
win.mLayoutNeeded = false;
|
||||||
win.prelayout();
|
win.prelayout();
|
||||||
mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
|
mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
|
||||||
win.mLayoutSeq = seq;
|
win.mLayoutSeq = seq;
|
||||||
|
@ -238,6 +238,12 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
// we can give the window focus before waiting for the relayout.
|
// we can give the window focus before waiting for the relayout.
|
||||||
boolean mRelayoutCalled;
|
boolean mRelayoutCalled;
|
||||||
|
|
||||||
|
// If the application has called relayout() with changes that can
|
||||||
|
// impact its window's size, we need to perform a layout pass on it
|
||||||
|
// even if it is not currently visible for layout. This is set
|
||||||
|
// when in that case until the layout is done.
|
||||||
|
boolean mLayoutNeeded;
|
||||||
|
|
||||||
// This is set after the Surface has been created but before the
|
// This is set after the Surface has been created but before the
|
||||||
// window has been drawn. During this time the surface is hidden.
|
// window has been drawn. During this time the surface is hidden.
|
||||||
boolean mDrawPending;
|
boolean mDrawPending;
|
||||||
@ -1449,7 +1455,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
return mViewVisibility == View.GONE
|
return mViewVisibility == View.GONE
|
||||||
|| !mRelayoutCalled
|
|| !mRelayoutCalled
|
||||||
|| (atoken == null && mRootToken.hidden)
|
|| (atoken == null && mRootToken.hidden)
|
||||||
|| (atoken != null && atoken.hiddenRequested)
|
|| (atoken != null && (atoken.hiddenRequested || atoken.hidden))
|
||||||
|| mAttachedHidden
|
|| mAttachedHidden
|
||||||
|| mExiting || mDestroying;
|
|| mExiting || mDestroying;
|
||||||
}
|
}
|
||||||
@ -1728,8 +1734,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
pw.print(mPolicyVisibilityAfterAnim);
|
pw.print(mPolicyVisibilityAfterAnim);
|
||||||
pw.print(" mAttachedHidden="); pw.println(mAttachedHidden);
|
pw.print(" mAttachedHidden="); pw.println(mAttachedHidden);
|
||||||
}
|
}
|
||||||
if (!mRelayoutCalled) {
|
if (!mRelayoutCalled || mLayoutNeeded) {
|
||||||
pw.print(prefix); pw.print("mRelayoutCalled="); pw.println(mRelayoutCalled);
|
pw.print(prefix); pw.print("mRelayoutCalled="); pw.print(mRelayoutCalled);
|
||||||
|
pw.print(" mLayoutNeeded="); pw.println(mLayoutNeeded);
|
||||||
}
|
}
|
||||||
if (mSurfaceResized || mSurfaceDestroyDeferred) {
|
if (mSurfaceResized || mSurfaceDestroyDeferred) {
|
||||||
pw.print(prefix); pw.print("mSurfaceResized="); pw.print(mSurfaceResized);
|
pw.print(prefix); pw.print("mSurfaceResized="); pw.print(mSurfaceResized);
|
||||||
|
Reference in New Issue
Block a user