Merge "Update rounded corner, cutout and display shape configs" into main

This commit is contained in:
Kimi Hsu 2023-09-15 03:27:32 +00:00 committed by Android (Google) Code Review
commit ca82d51506
4 changed files with 100 additions and 0 deletions

View file

@ -256,4 +256,35 @@
<!-- The max vibration strength allowed in audio haptic channels. --> <!-- The max vibration strength allowed in audio haptic channels. -->
<item name="config_hapticChannelMaxVibrationAmplitude" format="float" type="dimen">0.335</item> <item name="config_hapticChannelMaxVibrationAmplitude" format="float" type="dimen">0.335</item>
<dimen name="status_bar_height_default">52dp</dimen>
<dimen name="status_bar_height_portrait">52dp</dimen>
<dimen name="status_bar_height_landscape">52dp</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">
m 719,101 a 46.5,46.5 0 0 0 -93,0 46.5,46.5 0 0 0 93,0 z
@left
</string>
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
m 614.53715,43.5 h 115 v 115 h -115 z
@left
</string>
<!-- A string config in svg path format for the main display shape.
(@see https://www.w3.org/TR/SVG/paths.html#PathData).
This config must be set unless:
1. {@link Configuration#isScreenRound} is true which means the display shape is circular
and the system will auto-generate a circular shape.
2. The display has no rounded corner and the system will auto-generate a rectangular shape.
(@see DisplayShape#createDefaultDisplayShape)
Note: If the display supports multiple resolutions, please define the path config based on
the highest resolution so that it can be scaled correctly in each resolution. -->
<string name="config_mainDisplayShape">M 1343.13,226.31 V 2764.73 M 0.09,226.4 V 2764.83 M 224.16,2991.91 H 1118.97 M 224.65,0 h 894.8 m -0.3,2991.7 c 36.66,-0.06 74.28,1.14 109.5,-10.8 22.52,-7.01 43.12,-19.74 60.41,-35.82 17.04,-15.82 30.34,-35.6 38.92,-57.3 5.5,-13.82 9.58,-28.23 11.5,-43.02 4.09,-26.35 3.31,-53.26 3.46,-79.85 m 0.96,-2538.61 c -0.06,-37.05 1.13,-75.08 -10.68,-110.69 -6.93,-22.76 -19.53,-43.59 -35.43,-61.06 -15.65,-17.23 -35.21,-30.67 -56.68,-39.34 -13.67,-5.56 -27.93,-9.68 -42.56,-11.62 -26.06,-4.14 -52.69,-3.34 -78.99,-3.5 M 223.97,2991.7 c -36.66,-0.06 -74.28,1.14 -109.5,-10.8 -22.52,-7.01 -43.12,-19.75 -60.41,-35.81 -17.04,-15.82 -30.34,-35.6 -38.92,-57.3 -5.5,-13.82 -9.58,-28.23 -11.5,-43.02 -4.09,-26.35 -3.31,-53.26 -3.46,-79.85 m 0,-2538.61 C 0.25,189.25 -0.94,151.23 10.87,115.62 17.8,92.85 30.4,72.03 46.3,54.55 61.95,37.33 81.52,23.88 102.98,15.21 116.65,9.65 130.91,5.53 145.55,3.59 c 26.06,-4.14 52.69,-3.34 78.99,-3.5 z</string>
</resources> </resources>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2022, 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>
<!-- Radius of the software rounded corners. -->
<dimen name="rounded_corner_radius">115px</dimen>
<dimen name="rounded_corner_radius_top">118px</dimen>
<dimen name="rounded_corner_radius_bottom">115px</dimen>
</resources>

View file

@ -0,0 +1,22 @@
<!--
Copyright (C) 2023 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="225px"
android:height="225px"
android:viewportWidth="11.89"
android:viewportHeight="11.89">
<path
android:fillColor="#000000"
android:pathData="M 0.01,11.89 C 0.01,9.94 -0.05,7.94 0.57,6.07 0.94,4.88 1.61,3.78 2.45,2.86 3.28,1.96 4.32,1.25 5.46,0.8 6.19,0.51 6.94,0.29 7.72,0.19 9.11,-0.03 10.52,0.01 11.92,0.01 H 0.01 V 11.89 z"/>
</vector>

View file

@ -0,0 +1,22 @@
<!--
Copyright (C) 2023 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="225px"
android:height="225px"
android:viewportWidth="11.89"
android:viewportHeight="11.89">
<path
android:fillColor="#000000"
android:pathData="M 0.01,11.89 C 0.01,9.94 -0.05,7.94 0.57,6.07 0.94,4.88 1.61,3.78 2.45,2.86 3.28,1.96 4.32,1.25 5.46,0.8 6.19,0.51 6.94,0.29 7.72,0.19 9.11,-0.03 10.52,0.01 11.92,0.01 H 0.01 V 11.89 z"/>
</vector>