Merge "Propagate systemUiVisibility changes to window manager" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
dcd8c81bf4
@@ -7436,7 +7436,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
|
||||
void needGlobalAttributesUpdate(boolean force) {
|
||||
final AttachInfo ai = mAttachInfo;
|
||||
if (ai != null) {
|
||||
if (ai != null && !ai.mRecomputeGlobalAttributes) {
|
||||
if (force || ai.mKeepScreenOn || (ai.mSystemUiVisibility != 0)
|
||||
|| ai.mHasSystemUiListeners) {
|
||||
ai.mRecomputeGlobalAttributes = true;
|
||||
@@ -11719,6 +11719,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
// If nobody has evaluated the drawable state yet, then do it now.
|
||||
refreshDrawableState();
|
||||
}
|
||||
needGlobalAttributesUpdate(false);
|
||||
}
|
||||
|
||||
void dispatchDetachedFromWindow() {
|
||||
|
||||
@@ -1007,17 +1007,15 @@ public final class ViewRootImpl implements ViewParent,
|
||||
//Log.i(TAG, "Computing view hierarchy attributes!");
|
||||
attachInfo.mRecomputeGlobalAttributes = false;
|
||||
boolean oldScreenOn = attachInfo.mKeepScreenOn;
|
||||
int oldVis = attachInfo.mSystemUiVisibility;
|
||||
boolean oldHasSystemUiListeners = attachInfo.mHasSystemUiListeners;
|
||||
attachInfo.mKeepScreenOn = false;
|
||||
attachInfo.mSystemUiVisibility = 0;
|
||||
attachInfo.mHasSystemUiListeners = false;
|
||||
mView.dispatchCollectViewAttributes(attachInfo, 0);
|
||||
attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility;
|
||||
WindowManager.LayoutParams params = mWindowAttributes;
|
||||
if (attachInfo.mKeepScreenOn != oldScreenOn
|
||||
|| attachInfo.mSystemUiVisibility != oldVis
|
||||
|| attachInfo.mHasSystemUiListeners != oldHasSystemUiListeners) {
|
||||
WindowManager.LayoutParams params = mWindowAttributes;
|
||||
|| attachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility
|
||||
|| attachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) {
|
||||
applyKeepScreenOnFlag(params);
|
||||
params.subtreeSystemUiVisibility = attachInfo.mSystemUiVisibility;
|
||||
params.hasSystemUiListeners = attachInfo.mHasSystemUiListeners;
|
||||
|
||||
Reference in New Issue
Block a user