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

Commit d4e3fe4f authored by Adrian Roos's avatar Adrian Roos
Browse files

Don't draw system bar backgrounds if FLAG_FULLSCREEN is set

Bug: 17367264
Change-Id: Id43fc182505e66c2794a76d74e2ac9a6d4f9d569
parent 2dbf3eac
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -2755,12 +2755,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                        SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
                        mStatusBarColor, mLastTopInset, Gravity.TOP,
                        STATUS_BAR_BACKGROUND_TRANSITION_NAME,
                        com.android.internal.R.id.statusBarBackground);
                        com.android.internal.R.id.statusBarBackground,
                        (getAttributes().flags & FLAG_FULLSCREEN) != 0);
                mNavigationColorView = updateColorViewInt(mNavigationColorView,
                        SYSTEM_UI_FLAG_HIDE_NAVIGATION, FLAG_TRANSLUCENT_NAVIGATION,
                        mNavigationBarColor, mLastBottomInset, Gravity.BOTTOM,
                        NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME,
                        com.android.internal.R.id.navigationBarBackground);
                        com.android.internal.R.id.navigationBarBackground,
                        false /* hiddenByWindowFlag */);
            }
            if (insets != null) {
                insets = insets.consumeStableInsets();
@@ -2769,8 +2771,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        }

        private View updateColorViewInt(View view, int systemUiHideFlag, int translucentFlag,
                int color, int height, int verticalGravity, String transitionName, int id) {
                int color, int height, int verticalGravity, String transitionName, int id,
                boolean hiddenByWindowFlag) {
            boolean show = height > 0 && (mLastSystemUiVisibility & systemUiHideFlag) == 0
                    && !hiddenByWindowFlag
                    && (getAttributes().flags & translucentFlag) == 0
                    && (color & Color.BLACK) != 0
                    && (getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;