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

Commit 05072e22 authored by Tiger's avatar Tiger
Browse files

Don't disable APIs which ensure the contrast of system bars

They were disabled if the app is forced to be edge-to-edge. But there
might be risks that some apps might overlook the API change so that they
don't protect the 3-button navigation bar.

This CL takes those APIs back.

Bug: 309578419
Test: presubmit
Change-Id: Ibc1f805bf6bd8c80c76ea33caf094b3cd071af1d
parent 5e0cc0b9
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -2583,7 +2583,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            mNavigationBarDividerColor = a.getColor(R.styleable.Window_navigationBarDividerColor,
                    Color.TRANSPARENT);
        }
        if (!targetPreQ && !mEdgeToEdgeEnforced) {
        if (!targetPreQ) {
            mEnsureStatusBarContrastWhenTransparent = a.getBoolean(
                    R.styleable.Window_enforceStatusBarContrast, false);
            mEnsureNavigationBarContrastWhenTransparent = a.getBoolean(
@@ -3966,9 +3966,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

    @Override
    public void setStatusBarContrastEnforced(boolean ensureContrast) {
        if (mEdgeToEdgeEnforced) {
            return;
        }
        mEnsureStatusBarContrastWhenTransparent = ensureContrast;
        if (mDecor != null) {
            mDecor.updateColorViews(null, false /* animate */);
@@ -3982,9 +3979,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

    @Override
    public void setNavigationBarContrastEnforced(boolean enforceContrast) {
        if (mEdgeToEdgeEnforced) {
            return;
        }
        mEnsureNavigationBarContrastWhenTransparent = enforceContrast;
        if (mDecor != null) {
            mDecor.updateColorViews(null, false /* animate */);