Revert "Allow views to setSystemUiVisibility() with the same value and have it work."
This reverts commit fad9555217.
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user