Customize Rounded Corner and punch hole for P10
Screen size : 1080x2400 Test: make and enable debug Bug: 199469413 Bug: 199469519 Change-Id: Ica99e6ce1d56f1e6eed1ccd136a566d5cd8a99e7
This commit is contained in:
parent
973add41d6
commit
b5f4b7da86
8 changed files with 291 additions and 0 deletions
|
@ -44,6 +44,28 @@
|
|||
Must be in the range specified by minimum and maximum. -->
|
||||
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.17429718</item>
|
||||
|
||||
<!-- 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 506,68
|
||||
a 34,34 0 1 0 68,0 34,34 0 1 0 -68,0
|
||||
Z
|
||||
@left
|
||||
</string>
|
||||
|
||||
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
|
||||
M 480,0
|
||||
h 145
|
||||
v 118
|
||||
h -145
|
||||
Z
|
||||
@left
|
||||
</string>
|
||||
|
||||
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
|
||||
The N entries of this array define N 1 zones as follows:
|
||||
Zone 0: 0 <= LUX < array[0]
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2016, 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">47px</dimen>
|
||||
<dimen name="rounded_corner_radius_top">47px</dimen>
|
||||
<dimen name="rounded_corner_radius_bottom">48px</dimen>
|
||||
|
||||
<!-- Height of the status bar.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
<dimen name="status_bar_height">28dp</dimen>
|
||||
|
||||
<!-- Adjustment for software rounded corners since corners aren't perfectly round. -->
|
||||
<dimen name="rounded_corner_radius_adjustment">5px</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
Copyright (C) 2021 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="52px"
|
||||
android:height="52px"
|
||||
android:viewportWidth="52"
|
||||
android:viewportHeight="52">
|
||||
|
||||
<path
|
||||
android:pathData="M 0,52 C 0.32683353,43.202367 0.85447252,41.248308 1.3145175,39.164085 2.0040968,36.039962 2.9782965,32.856298 4.930956,28.619162 6.8640705,24.746011 8.3187229,22.369478 11.084159,18.732191 13.224854,16.076923 15.477574,13.820493 18.237083,11.460208 21.535606,8.8787888 24.600798,6.8299358 27.856989,5.3126631 30.399944,4.1277339 32.60573,3.1207111 36.079556,2.1085717 38.994035,1.3856528 42.187628,0.21928042 52,0 H 0 Z"
|
||||
android:fillColor="#000000" />
|
||||
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
Copyright (C) 2021 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="52px"
|
||||
android:height="52px"
|
||||
android:viewportWidth="52"
|
||||
android:viewportHeight="52">
|
||||
|
||||
<path
|
||||
android:pathData="M 0,52 C 0.36620502,42.772894 0.99266939,40.822359 1.441112,38.731412 1.9441013,36.386131 2.9782965,32.856298 4.930956,28.619162 6.8640705,24.746011 8.3187229,22.369478 11.084159,18.732191 13.224854,16.076923 15.477574,13.820493 18.237083,11.460208 21.535606,8.8787888 24.600798,6.8299358 27.856989,5.3126631 30.399944,4.1277339 32.68087,3.1650894 36.154696,2.15295 39.069175,1.430031 42.98474,0.36602086 52,0 H 0 Z"
|
||||
android:fillColor="#000000" />
|
||||
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2021, 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>
|
||||
<!-- With the large clock, move up slightly from the center to avoid UDFPS -->
|
||||
<dimen name="keyguard_large_clock_top_margin">-156dp</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2021, 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>
|
||||
<!-- Landscape, just use the regular values -->
|
||||
<dimen name="status_bar_padding_start">8dp</dimen>
|
||||
<dimen name="status_bar_padding_end">8dp</dimen>
|
||||
|
||||
<!-- the padding on the top of the statusbar (usually 0) -->
|
||||
<dimen name="status_bar_padding_top">0dp</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2021, 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
<!-- Type of a sensor that provides a low-power estimate of the desired display
|
||||
brightness, suitable to listen to while the device is asleep (e.g. during
|
||||
always-on display) -->
|
||||
<string name="doze_brightness_sensor_type" translatable="false">com.google.sensor.binned_brightness</string>
|
||||
|
||||
<!-- Doze: can we assume the pickup sensor includes a proximity check? -->
|
||||
<bool name="doze_pickup_performs_proximity_check">true</bool>
|
||||
|
||||
<!-- Doze: whether the double tap sensor reports 2D touch coordinates -->
|
||||
<bool name="doze_double_tap_reports_touch_coordinates">true</bool>
|
||||
|
||||
<!-- Doze: Table that translates sensor values from the doze_brightness_sensor_type sensor
|
||||
to brightness values; -1 means keeping the current brightness. -->
|
||||
<integer-array name="config_doze_brightness_sensor_to_brightness">
|
||||
<item>-1</item> <!-- 0: OFF -->
|
||||
<item>3</item> <!-- 1: NIGHT -->
|
||||
<item>3</item> <!-- 2: LOW -->
|
||||
<item>16</item> <!-- 3: HIGH -->
|
||||
<item>16</item> <!-- 4: SUN -->
|
||||
</integer-array>
|
||||
|
||||
<!-- Doze: Table that translates sensor values from the doze_brightness_sensor_type sensor
|
||||
to an opacity value for a black scrim that is overlaid in AOD1.
|
||||
Valid range is from 0 (transparent) to 255 (opaque).
|
||||
-1 means keeping the current opacity. -->
|
||||
<integer-array name="config_doze_brightness_sensor_to_scrim_opacity">
|
||||
<item>-1</item> <!-- 0: OFF -->
|
||||
<item>133</item> <!-- 1: NIGHT -->
|
||||
<item>0</item> <!-- 2: LOW -->
|
||||
<item>0</item> <!-- 3: HIGH -->
|
||||
<item>0</item> <!-- 4: SUN -->
|
||||
</integer-array>
|
||||
|
||||
<string name="proximity_sensor_type" translatable="false"></string>
|
||||
<item name="proximity_sensor_threshold" translatable="false" format="float" type="dimen"></item>
|
||||
<item name="proximity_sensor_threshold_latch" translatable="false" format="float" type="dimen"></item>
|
||||
<string name="proximity_sensor_secondary_type" translatable="false"></string>
|
||||
<item name="proximity_sensor_secondary_threshold" translatable="false" format="float" type="dimen"></item>
|
||||
|
||||
<!-- Default rounded corner curve (a Bezier). Must match (the curved path in) rounded.xml.
|
||||
Note that while rounded.xml includes the entire path (including the horizontal and vertical
|
||||
corner edges), this pulls out just the curve.
|
||||
-->
|
||||
<string name="config_rounded_mask" translatable="false">M 71,0 C 33,0 22,-1 10,10 -1,22 0,33 0,71</string>
|
||||
|
||||
<bool name="config_roundedCornerMultipleRadius">true</bool>
|
||||
|
||||
<!-- Configure 13px of extra protection around the front-facing camera -->
|
||||
<string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
|
||||
M 494,66
|
||||
a 46,46 0 1 0 92,0
|
||||
a 46,46 0 1 0 -92,0
|
||||
Z
|
||||
</string>
|
||||
|
||||
<!-- Camera 1 is the front camera on barbet -->
|
||||
<string translatable="false" name="config_protectedCameraId">1</string>
|
||||
|
||||
<!-- Comma-separated list of packages to exclude from camera protection. In our case,
|
||||
ignore the gaze detection package -->
|
||||
<string translatable="false" name="config_cameraProtectionExcludedPackages">com.google.android.as</string>
|
||||
|
||||
<bool name="config_enableDisplayCutoutProtection">true</bool>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2021, 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>
|
||||
<!-- Don't need the left side padding due to being inset from the cutout -->
|
||||
<dimen name="status_bar_padding_start">0dp</dimen>
|
||||
|
||||
<!-- for 20dp of padding at 3.5px/dp at default density -->
|
||||
<dimen name="rounded_corner_content_padding">47px</dimen>
|
||||
|
||||
<!-- the padding on the top of the statusbar (usually 0) -->
|
||||
<dimen name="status_bar_padding_top">1px</dimen>
|
||||
|
||||
<!-- Height of the status bar header bar when on Keyguard (match status_bar_height) -->
|
||||
<dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
|
||||
|
||||
<!-- Padding for the system icons on the keyguard (when no multi user switch is showing).
|
||||
The icons always have a 4dp padding in the container so we only need 56 extra px of padding
|
||||
for the corners -->
|
||||
<dimen name="system_icons_super_container_avatarless_margin_end">11px</dimen>
|
||||
|
||||
<!-- Multi user switch has some intrinsic padding to it -->
|
||||
<dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
|
||||
|
||||
<dimen name="keyguard_carrier_text_margin">0px</dimen>
|
||||
|
||||
<dimen name="config_rounded_mask_size">47px</dimen>
|
||||
<dimen name="config_rounded_mask_size_top">47px</dimen>
|
||||
<dimen name="config_rounded_mask_size_bottom">46px</dimen>
|
||||
|
||||
<!-- Location on the screen of the center of the physical power button. -->
|
||||
<dimen name="physical_power_button_center_screen_location_y">650px</dimen>
|
||||
|
||||
<!-- Location on the screen of the center of the physical volume up/down buttons. -->
|
||||
<dimen name="physical_volume_up_button_center_screen_location_y">950px</dimen>
|
||||
<dimen name="physical_volume_down_button_center_screen_location_y">1110px</dimen>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue