Shawn Lin 16496cb5c1 Add APIs to get system bar heights
In multi-display devices, there might be differnt cutout on each display
which also causes different status bar height.

Now we no longer overlay the status_bar_height dimen and keep it as
default value and add APIs to calculate the status bar size.

- Add APIs for getting status_bar_height & quick_qs_offset_height in
  system.
- Add APIs for getting split_shade_header_height and
  qs_header_system_icons_area_height in SystemUI.
- Remove all resource overlay for status_bar_height &
  quick_qs_offset_height.

Bug: 186604541
Test: atest SmallClockPositionTest DisplayLayoutTest
      HideDisplayCutoutOrganizerTest SizeCompatTests
      NotificationPanelViewControllerTest
Change-Id: I5a6dfcc6ff06da8ea0fe119fc9d4c089f13b0dff
2021-10-19 14:51:20 +08:00

62 lines
2.4 KiB
XML

<!--
~ Copyright (C) 2018 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">
<!-- The bounding path of the cutout region of the main built-in display.
Must either be empty if there is no cutout region, or a string that is parsable by
{@link android.util.PathParser}.
The path is assumed to be specified in display coordinates with pixel units and in
the display's native orientation, with the origin of the coordinate system at the
center top of the display.
To facilitate writing device-independent emulation overlays, the marker `@dp` can be
appended after the path string to interpret coordinates in dp instead of px units.
Note that a physical cutout should be configured in pixels for the best results.
-->
<string translatable="false" name="config_mainBuiltInDisplayCutout">
M 0,0
L -72, 0
L -69.9940446283, 20.0595537175
C -69.1582133885, 28.4178661152 -65.2, 32.0 -56.8, 32.0
L 56.8, 32.0
C 65.2, 32.0 69.1582133885, 28.4178661152 69.9940446283, 20.0595537175
L 72, 0
Z
@bottom
M 0,0
L -72, 0
L -69.9940446283, -20.0595537175
C -69.1582133885, -28.4178661152 -65.2, -32.0 -56.8, -32.0
L 56.8, -32.0
C 65.2, -32.0 69.1582133885, -28.4178661152 69.9940446283, -20.0595537175
L 72, 0
Z
@dp
</string>
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">@*android:string/config_mainBuiltInDisplayCutout</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>
</resources>