From d4e3fe4f7fbffcc5b8dabf6663906c97afbc4d60 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 8 Sep 2014 17:20:51 +0200 Subject: [PATCH] Don't draw system bar backgrounds if FLAG_FULLSCREEN is set Bug: 17367264 Change-Id: Id43fc182505e66c2794a76d74e2ac9a6d4f9d569 --- .../com/android/internal/policy/impl/PhoneWindow.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index f39727a88d532..cce30c7fecc75 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -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;