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

Commit bc000160 authored by Tiger's avatar Tiger
Browse files

Return Color.TRANSPARENT from getNavigationBarColor

If an app is forced to go edge-to-edge, the APIs to set navigation bar
color are disabled. It should always get Color.TRANSPARENT from
Window#getNavigationBarColor.

Bug: 309578419
Flag: com.android.window.flags.enforce_edge_to_edge
Test: atest WindowPolicyTests
Change-Id: Ie8090db1f11160086930f9d1c4728a7d097d9eda
parent 69a62d57
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3945,6 +3945,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

    @Override
    public int getNavigationBarColor() {
        if (mEdgeToEdgeEnforced) {
            return Color.TRANSPARENT;
        }
        return mNavigationBarColor;
    }