From 5e2daa3db32168ad58286a8a78fb29a951fafc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20G=C3=B6llner?= Date: Wed, 15 Nov 2023 14:06:42 +0000 Subject: [PATCH] [Comet] Set status bar height to match specs and tweak cutout rect The height specs of the status bar are 56dp when the camera is at the top and 36dp when the camera is at the bottom. To achieve this, we set the status bar height config to 36dp, which will be used when the camera is at the bottom. Then to achieve 56dp when the camera is at the top, we use the cutout rect approximation, and make it 56dp in height. The height of the status bar is adjusted to be at least as tall as the cutout rect. + Tweak the cutout rect, to make it be in the corner and intersect with the top and right of the screen, which is needed for status bar inset calculations. Before, it had a vertical offset, and was offscreen to the right. Now it is a rect that starts from the top right of the screen and goes to 56dp in height and until the end of the camera in width. Test: Manual Fixes: 309773362 Change-Id: I9425364bab2e1413c02674cb2ae2c5be411f70c3 --- .../core/res/res/values-sw820dp/config.xml | 24 +++++++++++++++++++ .../base/core/res/res/values/config.xml | 6 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 comet/overlay/frameworks/base/core/res/res/values-sw820dp/config.xml diff --git a/comet/overlay/frameworks/base/core/res/res/values-sw820dp/config.xml b/comet/overlay/frameworks/base/core/res/res/values-sw820dp/config.xml new file mode 100644 index 0000000..98baec9 --- /dev/null +++ b/comet/overlay/frameworks/base/core/res/res/values-sw820dp/config.xml @@ -0,0 +1,24 @@ + + + + + 36dp + 36dp + 36dp + diff --git a/comet/overlay/frameworks/base/core/res/res/values/config.xml b/comet/overlay/frameworks/base/core/res/res/values/config.xml index 5a8cb8c..7720f55 100644 --- a/comet/overlay/frameworks/base/core/res/res/values/config.xml +++ b/comet/overlay/frameworks/base/core/res/res/values/config.xml @@ -275,7 +275,11 @@ - m 1932,21 h 113 V 136 h -113 z + m 0,0 + V 136 + h -132 + V 0 + z @right