summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@google.com> 2011-08-17 16:21:38 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-08-17 16:21:38 -0700
commit351eb33d84fb76f1addf6a18ce4c7ff5ca40dd5d (patch)
tree649d9e21d4351ca1be1b6b11a59e2c01b3af1aa6
parent3e236950ee405c925e774a8e0cf65a27a6dce1dd (diff)
parentfad9555217ce3a657ffc7cba458a0d2622f7a379 (diff)
Merge "Allow views to setSystemUiVisibility() with the same value and have it work."
-rw-r--r--core/java/android/view/View.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 6627bf63f333..886a47829816 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -12663,13 +12663,15 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
* Request that the visibility of the status bar be changed.
* @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or
* {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}.
+ *
+ * This value will be re-applied immediately, even if the flags have not changed, so a view may
+ * easily reassert a particular SystemUiVisibility condition even if the system UI itself has
+ * since countermanded the original request.
*/
public void setSystemUiVisibility(int visibility) {
- if (visibility != mSystemUiVisibility) {
- mSystemUiVisibility = visibility;
- if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
- mParent.recomputeViewAttributes(this);
- }
+ mSystemUiVisibility = visibility;
+ if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
+ mParent.recomputeViewAttributes(this);
}
}