summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRoot.java
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2011-01-25 19:53:17 -0800
committerJoe Onorato <joeo@google.com>2011-01-26 10:47:39 -0800
commit14782f705e94d4e563a48efc85fd25129fd38a7d (patch)
tree0d11023cf0e2c6977e23e1a0ec560aa2242c4c84 /core/java/android/view/ViewRoot.java
parent55bf3809b98dad0b8268804e684d63ea59124148 (diff)
Expose the window flags for lights out mode.
I hadn't wanted to do this, but it makes porting the FLAG_FULLSCREEN stuff over to this simpler because you don't have to go find a view to proxy through. This change also clears the flag everywhere when the window manager notifies the views that the change has come back. Change-Id: I48392c7550925bcca50c5bb9e1f263e99de6c7bc
Diffstat (limited to 'core/java/android/view/ViewRoot.java')
-rw-r--r--core/java/android/view/ViewRoot.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index b0553c60c701..042095a14d69 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -903,8 +903,9 @@ public final class ViewRoot extends Handler implements ViewParent,
attachInfo.mSystemUiVisibility = 0;
attachInfo.mHasSystemUiListeners = false;
host.dispatchCollectViewAttributes(0);
- if (attachInfo.mKeepScreenOn != oldScreenOn ||
- attachInfo.mSystemUiVisibility != oldVis) {
+ if (attachInfo.mKeepScreenOn != oldScreenOn
+ || attachInfo.mSystemUiVisibility != oldVis
+ || attachInfo.mHasSystemUiListeners) {
params = lp;
}
}
@@ -987,8 +988,10 @@ public final class ViewRoot extends Handler implements ViewParent,
if (attachInfo.mKeepScreenOn) {
params.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
}
- params.systemUiVisibility = attachInfo.mSystemUiVisibility;
- params.hasSystemUiListeners = attachInfo.mHasSystemUiListeners;
+ params.subtreeSystemUiVisibility = attachInfo.mSystemUiVisibility;
+ params.hasSystemUiListeners = attachInfo.mHasSystemUiListeners
+ || params.subtreeSystemUiVisibility != 0
+ || params.systemUiVisibility != 0;
}
if (DEBUG_LAYOUT) {
Log.i(TAG, "host=w:" + host.getMeasuredWidth() + ", h:" +
@@ -2854,6 +2857,9 @@ public final class ViewRoot extends Handler implements ViewParent,
public void handleDispatchSystemUiVisibilityChanged(int visibility) {
if (mView == null) return;
+ if (mAttachInfo != null) {
+ mAttachInfo.mSystemUiVisibility = visibility;
+ }
mView.dispatchSystemUiVisibilityChanged(visibility);
}