ScreenDecorations: Only draw cutout if requested

Change-Id: I149e9f7d8b1ec7164e717f713731c618cf2772c0
Fixes: 77798197
Test: set config_fillMainBuiltInDisplayCutout=false, verify no soft cutout gets drawn.
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index a0fa69e..287819b 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -207,7 +207,11 @@
     }
 
     private boolean shouldDrawCutout() {
-        return mContext.getResources().getBoolean(
+        return shouldDrawCutout(mContext);
+    }
+
+    static boolean shouldDrawCutout(Context context) {
+        return context.getResources().getBoolean(
                 com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
     }
 
@@ -385,7 +389,7 @@
             mBoundingRect.setEmpty();
             mBoundingPath.reset();
             int newVisible;
-            if (hasCutout()) {
+            if (shouldDrawCutout(getContext()) && hasCutout()) {
                 mBounds.set(mInfo.displayCutout.getBounds());
                 localBounds(mBoundingRect);
                 mInfo.displayCutout.getBounds().getBoundaryPath(mBoundingPath);