Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e085ae55 authored by Tiger Huang's avatar Tiger Huang Committed by Automerger Merge Worker
Browse files

Merge "Remove the light flag if the bar isn't specified light in theme" into sc-dev am: de8ea692

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175031

Change-Id: I09f7b6f9beae28ad2ca6517d4b27ce8a91b2c046
parents ee4962cc de8ea692
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -2512,14 +2512,15 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
            params.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
        }
        if (a.getBoolean(R.styleable.Window_windowLightStatusBar, false)) {
        final int sysUiVis = decor.getSystemUiVisibility();
        final int statusLightFlag = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        final int statusFlag = a.getBoolean(R.styleable.Window_windowLightStatusBar, false)
                ? statusLightFlag : 0;
        final int navLightFlag = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
        final int navFlag = a.getBoolean(R.styleable.Window_windowLightNavigationBar, false)
                ? navLightFlag : 0;
        decor.setSystemUiVisibility(
                    decor.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }
        if (a.getBoolean(R.styleable.Window_windowLightNavigationBar, false)) {
            decor.setSystemUiVisibility(
                    decor.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
        }
                (sysUiVis & ~(statusLightFlag | navLightFlag)) | (statusFlag | navFlag));
        if (a.hasValue(R.styleable.Window_windowLayoutInDisplayCutoutMode)) {
            int mode = a.getInt(R.styleable.Window_windowLayoutInDisplayCutoutMode, -1);
            if (mode < LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT