Merge "Revert "Allow views to setSystemUiVisibility() with the same value and have it work."" into ics-factoryrom
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 @@
* 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);
+ }
}
}