Reenable colored bars for multiwindow

Fix the previous bug that caused that we needed to disable colored bars
by only forcing the layout fullscreen flag for windows that would like
to be laid out with MATCH_PARENT.

Bug: 26050571
Bug: 24365214
Change-Id: I4f197ae5e2bf042980f5e8dc9eb852843af9859c
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 8a16850..6fcf1d6 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -1594,10 +1594,8 @@
 
         mScreenshotChordEnabled = mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_enableScreenshotChord);
-        // TODO(b/26050571): This can be only reenabled, if there are measure to prevent the alert
-        // windows from being fullscreen. Please consult the bug before enabling.
-        mForceWindowDrawsStatusBarBackground = false; // mContext.getResources().getBoolean(
-                //R.bool.config_forceWindowDrawsStatusBarBackground);
+        mForceWindowDrawsStatusBarBackground = mContext.getResources().getBoolean(
+                R.bool.config_forceWindowDrawsStatusBarBackground);
 
         mGlobalKeyManager = new GlobalKeyManager(mContext);
 
@@ -2065,7 +2063,8 @@
                 attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
             }
             if ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
-                    || mForceWindowDrawsStatusBarBackground) {
+                    || (mForceWindowDrawsStatusBarBackground
+                            && attrs.height == MATCH_PARENT && attrs.width == MATCH_PARENT)) {
                 attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
             }
         }