Merge "Fix navigation bar icon invisible with dimming window" into sc-v2-dev am: c170b7ead0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16512317 Change-Id: Iaba84757dbfd6ec118fe0a56d187f35eb9d30437
This commit is contained in:
@@ -2840,8 +2840,7 @@ public class DisplayPolicy {
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
int updateLightNavigationBarLw(int appearance, WindowState navColorWin) {
|
int updateLightNavigationBarLw(int appearance, WindowState navColorWin) {
|
||||||
if (navColorWin == null || navColorWin.isDimming()
|
if (navColorWin == null || !isLightBarAllowed(navColorWin, Type.navigationBars())) {
|
||||||
|| !isLightBarAllowed(navColorWin, Type.navigationBars())) {
|
|
||||||
// Clear the light flag while not allowed.
|
// Clear the light flag while not allowed.
|
||||||
appearance &= ~APPEARANCE_LIGHT_NAVIGATION_BARS;
|
appearance &= ~APPEARANCE_LIGHT_NAVIGATION_BARS;
|
||||||
return appearance;
|
return appearance;
|
||||||
|
|||||||
@@ -189,11 +189,6 @@ public class DisplayPolicyTests extends WindowTestsBase {
|
|||||||
assertEquals(0,
|
assertEquals(0,
|
||||||
displayPolicy.updateLightNavigationBarLw(APPEARANCE_LIGHT_NAVIGATION_BARS, null));
|
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.
|
// Control window overrides APPEARANCE_LIGHT_NAVIGATION_BARS flag.
|
||||||
assertEquals(0, displayPolicy.updateLightNavigationBarLw(0, opaqueDarkNavBar));
|
assertEquals(0, displayPolicy.updateLightNavigationBarLw(0, opaqueDarkNavBar));
|
||||||
assertEquals(0, displayPolicy.updateLightNavigationBarLw(
|
assertEquals(0, displayPolicy.updateLightNavigationBarLw(
|
||||||
|
|||||||
Reference in New Issue
Block a user