[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
This commit is contained in:
parent
daf0aa8a8b
commit
5e2daa3db3
2 changed files with 29 additions and 1 deletions
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2023, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<dimen name="status_bar_height_default">36dp</dimen>
|
||||
<dimen name="status_bar_height_portrait">36dp</dimen>
|
||||
<dimen name="status_bar_height_landscape">36dp</dimen>
|
||||
</resources>
|
|
@ -275,7 +275,11 @@
|
|||
</string>
|
||||
|
||||
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
|
||||
m 1932,21 h 113 V 136 h -113 z
|
||||
m 0,0
|
||||
V 136
|
||||
h -132
|
||||
V 0
|
||||
z
|
||||
@right
|
||||
</string>
|
||||
<string translatable="false" name="config_secondaryBuiltInDisplayCutout">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue