Skip to content

Commit cc22b99

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Revert "Allow views to setSystemUiVisibility() with the same value and have it work."" into ics-factoryrom
2 parents 624181a + 7052406 commit cc22b99

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

core/java/android/view/View.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12969,15 +12969,13 @@ public boolean performHapticFeedback(int feedbackConstant, int flags) {
1296912969
* Request that the visibility of the status bar be changed.
1297012970
* @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or
1297112971
* {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}.
12972-
*
12973-
* This value will be re-applied immediately, even if the flags have not changed, so a view may
12974-
* easily reassert a particular SystemUiVisibility condition even if the system UI itself has
12975-
* since countermanded the original request.
1297612972
*/
1297712973
public void setSystemUiVisibility(int visibility) {
12978-
mSystemUiVisibility = visibility;
12979-
if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
12980-
mParent.recomputeViewAttributes(this);
12974+
if (visibility != mSystemUiVisibility) {
12975+
mSystemUiVisibility = visibility;
12976+
if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
12977+
mParent.recomputeViewAttributes(this);
12978+
}
1298112979
}
1298212980
}
1298312981

0 commit comments

Comments
 (0)