diff options
author | Daniel Sandler <dsandler@android.com> | 2011-09-21 00:30:47 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2011-09-21 13:34:15 -0400 |
commit | 705240631beffaedc28bc0b950e8b7f09b6d3b5d (patch) | |
tree | cbba1f2c3bf8a5f796e50aee6a6c82300a8bbe0f /core/java | |
parent | aff24a52d20a26a8cd374ea6dd284eee16e4ffc0 (diff) | |
download | frameworks_base-705240631beffaedc28bc0b950e8b7f09b6d3b5d.zip frameworks_base-705240631beffaedc28bc0b950e8b7f09b6d3b5d.tar.gz frameworks_base-705240631beffaedc28bc0b950e8b7f09b6d3b5d.tar.bz2 |
Revert "Allow views to setSystemUiVisibility() with the same value and have it work."
This reverts commit fad9555217ce3a657ffc7cba458a0d2622f7a379.
Because it just didn't work. (The views kept aggressively
re-applying their preferred flags every time view attributes
were aggregated.)
We'll pursue the original strategy, like lights out mode in
HC: if you want to tickle this mode, un-set and re-set the
flags (preferably synchronized with the global SystemUI
visibility state as reported by onSystemUiVisibilityChanged
callbacks).
Bug: 5052456
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/view/View.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index ca06b9c..f993160 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -12969,15 +12969,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * 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) { - mSystemUiVisibility = visibility; - if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) { - mParent.recomputeViewAttributes(this); + if (visibility != mSystemUiVisibility) { + mSystemUiVisibility = visibility; + if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) { + mParent.recomputeViewAttributes(this); + } } } |