DO NOT MERGE Customize Bramble rounded corner and punch hole

Refine the rounded corner and punch hole by S/W anti-aliasing
1. H/W Camera center(77,77) and radius=39px
2. Rounded corner edge 136x136
3. Bramble density ratio = 420 / 160 = 2.625

Test: manual
Test: run cts --module CtsWindowManagerDeviceTestCases
      -t android.server.wm.ConfigChangeTests
Bug: 143222961
Change-Id: Ic816916d4f3608afc7e217615805787a133d0038
diff --git a/bramble/overlay/frameworks/base/core/res/res/values/config.xml b/bramble/overlay/frameworks/base/core/res/res/values/config.xml
index c8e359c..39722d1 100755
--- a/bramble/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/bramble/overlay/frameworks/base/core/res/res/values/config.xml
@@ -183,10 +183,43 @@
     <!-- Whether or not we should show the option to show battery percentage -->
     <bool name="config_battery_percentage_setting_available">true</bool>
 
-    <!-- Default radius of the software rounded corners. -->
-    <dimen name="rounded_corner_radius">140px</dimen>
+    <!-- Whether or not wcg mode should be enabled on this device -->
+    <bool name="config_enableWcgMode">true</bool>
 
-    <!-- Height of the status bar -->
-    <dimen name="status_bar_height_portrait">28dp</dimen>
+    <!-- Whether the display cutout region of the main built-in display should be forced to
+         black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+     -->
+    <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
 
+    <!-- Display cutout configuration -->
+    <string translatable="false" name="config_mainBuiltInDisplayCutout">
+      <!-- The hole punch dimensions are this:
+      M 38,78 a 39,39 0 1,0 78,0 a 39,39 0 1,0 -78,0
+      but using a radius 40 circle for now to see the antialiasing.
+      -->
+        M 37,77 a 40,40 0 1 0 80,0 40,40 0 1 0 -80,0 Z
+
+        @left
+    </string>
+
+    <string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
+        M 0.0,0.0
+        h 136
+        v 136
+        h -136
+        Z
+        @left
+    </string>
+
+    <!-- Radius of the software rounded corners. -->
+    <dimen name="rounded_corner_radius">108px</dimen>
+
+    <!-- Height of the status bar in portrait. The height should be
+         Max((status bar content height + waterfall top size), top cutout size) -->
+    <dimen name="status_bar_height_portrait">136px</dimen>
+    <dimen name="status_bar_height_landscape">28dp</dimen>
+    <!-- Height of area above QQS where battery/time go (equal to status bar) -->
+    <dimen name="quick_qs_offset_height">136px</dimen>
+    <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+    <dimen name="quick_qs_total_height">488px</dimen>
 </resources>
diff --git a/bramble/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml b/bramble/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml
new file mode 100644
index 0000000..6bd2018
--- /dev/null
+++ b/bramble/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml
@@ -0,0 +1,23 @@
+<!--
+    Copyright (C) 2020 The Android Open Source Project
+
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="136px"
+        android:height="136px"
+        android:viewportWidth="136.0"
+        android:viewportHeight="136.0">
+
+    <path
+        android:pathData="M 0,0 V 136 C 4,80 9,58 33,33 58,9 80,4 136,0 Z"
+        android:fillColor="#000000" />
+</vector>
diff --git a/bramble/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/bramble/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
index d23059a..5fc9639 100644
--- a/bramble/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
+++ b/bramble/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -58,4 +58,25 @@
         <item>0</item> <!-- 3: HIGH -->
         <item>0</item> <!-- 4: SUN -->
     </integer-array>
+
+    <!-- Default rounded corner curve (a Bezier). Must match (the curved path in) rounded.xml.
+         Note that while rounded.xml includes the entire path (including the horizontal and vertical
+         corner edges), this pulls out just the curve.
+     -->
+    <string name="config_rounded_mask" translatable="false">M136,0 C80,4 58,9 33,33 9,58 4,80 0,136</string>
+
+    <bool name="config_roundedCornerMultipleRadius">true</bool>
+
+    <!-- Configure 13px of extra protection around the front-facing camera -->
+    <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+        M 25,77
+        a 52,52 0 1 0 104,0
+        a 52,52 0 1 0 -104,0
+        Z
+    </string>
+
+    <!-- Camera 1 is the front camera on bramble -->
+    <string translatable="false" name="config_protectedCameraId">1</string>
+
+    <bool name="config_enableDisplayCutoutProtection">true</bool>
 </resources>
diff --git a/bramble/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/bramble/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
new file mode 100644
index 0000000..dddc147
--- /dev/null
+++ b/bramble/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+
+<resources>
+    <!-- Don't need the left side padding due to being inset from the cutout -->
+    <dimen name="status_bar_padding_start">0dp</dimen>
+
+    <!-- for 20dp of padding at 3.5px/dp at default density -->
+    <dimen name="rounded_corner_content_padding">50px</dimen>
+
+    <!-- the padding on the top of the statusbar (usually 0) -->
+    <dimen name="status_bar_padding_top">1dp</dimen>
+
+    <!-- Padding for the system icons on the keyguard (when no multi user switch is showing).
+    The icons always have a 4dp padding in the container so we only need 56 extra px of padding
+    for the corners -->
+    <dimen name="system_icons_super_container_avatarless_margin_end">56px</dimen>
+
+    <!-- Multi user switch has some intrinsic padding to it -->
+    <dimen name="multi_user_switch_keyguard_margin">40px</dimen>
+
+    <dimen name="keyguard_carrier_text_margin">0px</dimen>
+
+    <dimen name="config_rounded_mask_size">136px</dimen>
+    <dimen name="config_rounded_mask_size_top">136px</dimen>
+    <dimen name="config_rounded_mask_size_bottom">136px</dimen>
+
+</resources>