Skip to content

Commit 602290a

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Retain current visibility when copying layoutparam" into jb-dev
2 parents a08dc5d + 3fe38c0 commit 602290a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/java/android/view/ViewRootImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ void setLayoutParams(WindowManager.LayoutParams attrs, boolean newView) {
763763
// preserve compatible window flag if exists.
764764
int compatibleWindowFlag =
765765
mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
766+
// transfer over system UI visibility values as they carry current state.
767+
attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility;
768+
attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility;
766769
mWindowAttributesChangesFlag = mWindowAttributes.copyFrom(attrs);
767770
mWindowAttributes.flags |= compatibleWindowFlag;
768771

0 commit comments

Comments
 (0)