otter: overlay: Add proper cutout and adjust statusbar dimensions
Change-Id: I66df4d4d77a72df09e095c271501ba55df963687
diff --git a/overlay/FrameworksResTarget/res/values/config.xml b/overlay/FrameworksResTarget/res/values/config.xml
index a8b5d64..bd1ddeb 100644
--- a/overlay/FrameworksResTarget/res/values/config.xml
+++ b/overlay/FrameworksResTarget/res/values/config.xml
@@ -92,13 +92,32 @@
@see https://www.w3.org/TR/SVG/paths.html#PathData
-->
<string name="config_mainBuiltInDisplayCutout" translatable="false">
- M -43.5 0
- L -43.5 103
- L 43.5 103
- L 43.5 0
+ M 508,46.5
+ a 32,32 0 1 0 64,0
+ a 32,32 0 1 0 -64,0
+ Z
+ @left
+ </string>
+
+ <!-- Like config_mainBuiltInDisplayCutout, but this path is used to report the
+ one single bounding rect per device edge to the app via
+ {@link DisplayCutout#getBoundingRect}. Note that this path should try to match the visual
+ appearance of the cutout as much as possible, and may be smaller than
+ config_mainBuiltInDisplayCutout
+ -->
+ <string name="config_mainBuiltInDisplayCutoutRectApproximation" translatable="false">
+ M -32 0
+ L -32 93
+ L 32 93
+ L 32 0
Z
</string>
+ <!-- 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>
+
<!-- MMS user agent string -->
<string name="config_mms_user_agent" translatable="false">Android-Mms/2.0</string>
diff --git a/overlay/FrameworksResTarget/res/values/dimens.xml b/overlay/FrameworksResTarget/res/values/dimens.xml
index 81e7ae1..e172215 100644
--- a/overlay/FrameworksResTarget/res/values/dimens.xml
+++ b/overlay/FrameworksResTarget/res/values/dimens.xml
@@ -4,6 +4,9 @@
SPDX-License-Identifier: Apache-2.0
-->
<resources>
+ <!-- Default paddings for content around the corners. -->
+ <dimen name="rounded_corner_content_padding">14dp</dimen>
+
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
calculate the status bar height. -->
<dimen name="status_bar_height_default">28dp</dimen>
@@ -11,7 +14,7 @@
<!-- Height of the status bar in portrait.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
- <dimen name="status_bar_height_portrait">28dp</dimen>
+ <dimen name="status_bar_height_portrait">93px</dimen>
<!-- Height of the status bar in landscape.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
diff --git a/overlay/SystemUIResTarget/res/values-land/dimens.xml b/overlay/SystemUIResTarget/res/values-land/dimens.xml
deleted file mode 100644
index aa38d83..0000000
--- a/overlay/SystemUIResTarget/res/values-land/dimens.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- SPDX-FileCopyrightText: 2022 The LineageOS Project
- SPDX-License-Identifier: Apache-2.0
--->
-<resources>
- <!-- the padding on the top of the statusbar (usually 0) -->
- <dimen name="status_bar_padding_top">0px</dimen>
-</resources>
diff --git a/overlay/SystemUIResTarget/res/values/config.xml b/overlay/SystemUIResTarget/res/values/config.xml
index b5c6a4c..ba92774 100644
--- a/overlay/SystemUIResTarget/res/values/config.xml
+++ b/overlay/SystemUIResTarget/res/values/config.xml
@@ -4,6 +4,28 @@
SPDX-License-Identifier: Apache-2.0
-->
<resources>
+ <!-- A path similar to frameworks/base/core/res/res/values/config.xml
+ config_mainBuiltInDisplayCutout that describes a path larger than the exact path of a outer
+ display cutout. If present as well as config_enableDisplayCutoutProtection is set to true,
+ then SystemUI will draw this "protection path" instead of the display cutout path that is
+ normally used for anti-aliasing.
+
+ This path will only be drawn when the front-facing camera turns on, otherwise the main
+ DisplayCutout path will be rendered
+ -->
+ <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+ M 503,46.5
+ a 37,37 0 1 0 74,0
+ a 37,37 0 1 0 -74,0
+ Z
+ </string>
+
+ <!-- ID for the camera of outer display that needs extra protection -->
+ <string translatable="false" name="config_protectedCameraId">1</string>
+
+ <!-- Flag to turn on the rendering of the above path or not -->
+ <bool name="config_enableDisplayCutoutProtection">true</bool>
+
<!-- Whether to show a warning notification when device's skin temperature is high. -->
<integer name="config_showTemperatureWarning">1</integer>
diff --git a/overlay/SystemUIResTarget/res/values/dimens.xml b/overlay/SystemUIResTarget/res/values/dimens.xml
index e9454c6..1fa4e96 100644
--- a/overlay/SystemUIResTarget/res/values/dimens.xml
+++ b/overlay/SystemUIResTarget/res/values/dimens.xml
@@ -4,13 +4,14 @@
SPDX-License-Identifier: Apache-2.0
-->
<resources>
- <!-- the padding on the top of the statusbar (usually 0) -->
- <dimen name="status_bar_padding_top">18px</dimen>
-
<!-- Height of the status bar header bar when on Keyguard -->
<dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
- <dimen name="rounded_corner_content_padding">24px</dimen>
+ <!-- Margin on the left side of the carrier text on Keyguard -->
+ <dimen name="keyguard_carrier_text_margin">4dp</dimen>
+
+ <!-- Total minimum padding to enforce to ensure that the dot can always show -->
+ <dimen name="ongoing_appops_dot_min_padding">14dp</dimen>
<!-- Location on the screen of the center of the physical power button. -->
<dimen name="physical_power_button_center_screen_location_y">800px</dimen>