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

Commit dc2bbd53 authored by Jerry Chang's avatar Jerry Chang Committed by Automerger Merge Worker
Browse files

Merge "Fix navigation bar icon invisible with dimming window" into sc-v2-dev...

Merge "Fix navigation bar icon invisible with dimming window" into sc-v2-dev am: c170b7ea am: e177a637

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

Change-Id: I452cdba47c321c7143f20b6919c11aea6f446c9e
parents ceb8185f e177a637
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2378,8 +2378,7 @@ public class DisplayPolicy {

    @VisibleForTesting
    int updateLightNavigationBarLw(int appearance, WindowState navColorWin) {
        if (navColorWin == null || navColorWin.isDimming()
                || !isLightBarAllowed(navColorWin, Type.navigationBars())) {
        if (navColorWin == null || !isLightBarAllowed(navColorWin, Type.navigationBars())) {
            // Clear the light flag while not allowed.
            appearance &= ~APPEARANCE_LIGHT_NAVIGATION_BARS;
            return appearance;
+0 −5
Original line number Diff line number Diff line
@@ -189,11 +189,6 @@ public class DisplayPolicyTests extends WindowTestsBase {
        assertEquals(0,
                displayPolicy.updateLightNavigationBarLw(APPEARANCE_LIGHT_NAVIGATION_BARS, null));

        // Dimming window clears APPEARANCE_LIGHT_NAVIGATION_BARS.
        assertEquals(0, displayPolicy.updateLightNavigationBarLw(0, dimming));
        assertEquals(0, displayPolicy.updateLightNavigationBarLw(
                APPEARANCE_LIGHT_NAVIGATION_BARS, dimming));

        // Control window overrides APPEARANCE_LIGHT_NAVIGATION_BARS flag.
        assertEquals(0, displayPolicy.updateLightNavigationBarLw(0, opaqueDarkNavBar));
        assertEquals(0, displayPolicy.updateLightNavigationBarLw(