Merge "Fix setSystemBarsAppearances" into sc-v2-dev am: baedc4fdda am: 491d113504
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17378203 Change-Id: Idf7d59382d9cae3161c10655e4533a42ebc5b080 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -171,8 +171,9 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host {
|
||||
public void setSystemBarsAppearance(int appearance, int mask) {
|
||||
mViewRoot.mWindowAttributes.privateFlags |= PRIVATE_FLAG_APPEARANCE_CONTROLLED;
|
||||
final InsetsFlags insetsFlags = mViewRoot.mWindowAttributes.insetsFlags;
|
||||
if (insetsFlags.appearance != appearance) {
|
||||
insetsFlags.appearance = (insetsFlags.appearance & ~mask) | (appearance & mask);
|
||||
final int newAppearance = (insetsFlags.appearance & ~mask) | (appearance & mask);
|
||||
if (insetsFlags.appearance != newAppearance) {
|
||||
insetsFlags.appearance = newAppearance;
|
||||
mViewRoot.mWindowAttributesChanged = true;
|
||||
mViewRoot.scheduleTraversals();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user