Customize Rounded Corner and punch hole for C10/G10
Screen size : 1440x3120 Test: make and flash, enable debug mode and check visual Bug: 199468172 Bug: 199467921 Bug: 203593020 Bug: 203592814 Change-Id: I0bc273452756a48608e3a7d08e9d19ee85fdcc6f
This commit is contained in:
parent
b1b9c9c339
commit
7b47713993
6 changed files with 253 additions and 0 deletions
|
@ -44,6 +44,29 @@
|
|||
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 676,72
|
||||
a 43,43 0 1 0 86,0
|
||||
a 43,43 0 1 0 -86,0
|
||||
Z
|
||||
@left
|
||||
</string>
|
||||
|
||||
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
|
||||
M 653,0
|
||||
h 145
|
||||
v 130
|
||||
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">50px</dimen>
|
||||
<dimen name="rounded_corner_radius_top">50px</dimen>
|
||||
<dimen name="rounded_corner_radius_bottom">49px</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,24 @@
|
|||
<!--
|
||||
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="176px"
|
||||
android:height="176px"
|
||||
android:viewportWidth="176"
|
||||
android:viewportHeight="176">
|
||||
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M 176,0 C 115.0238,1.1656496 102.53444,1.6177119 71.39639,3.3840542 55.923895,4.7275334 47.497614,6.018167 41.513855,7.981025 c -4.739091,1.5545684 -10.12658,4.010582 -14.72796,6.912399 -3.88932,2.452765 -6.723047,5.031081 -9.855743,8.228644 -3.872981,3.953175 -5.63514,7.245344 -7.8627801,11.693275 C 6.5442473,39.853268 4.8906853,45.485594 4.2629643,49.251025 2.1107263,62.161384 2.0435492,76.126365 1.3622065,93.833044 0.29590205,121.54408 0.79450819,135.72178 0,176 V 0 Z" />
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!--
|
||||
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="176px"
|
||||
android:height="176px"
|
||||
android:viewportWidth="176"
|
||||
android:viewportHeight="176">
|
||||
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M 176,0 C 115.0238,1.1656496 102.53444,1.6177119 71.39639,3.3840542 55.658931,4.464517 48.371797,5.381139 40.939069,7.5951704 36.159077,9.0190158 30.970656,11.336916 26.369276,14.238733 22.479956,16.691498 19.646229,19.269814 16.513533,22.467377 12.640552,26.420552 10.129621,29.74615 8.1077333,34.291306 5.3988084,40.380905 4.5631294,44.598944 3.760158,49.204306 1.5210754,62.04634 2.0435492,76.126365 1.3622065,93.833044 0.29590205,121.54408 0.79450819,135.72178 0,176 V 0 Z" />
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?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: only register sensors that use prox when device is in certain Display states. This
|
||||
may delay registering sensors when device first shows dozing UI but the
|
||||
Display & Power state hasn't changed to low-power mode yet. -->
|
||||
<bool name="doze_selectively_register_prox">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>5</item> <!-- 1: NIGHT -->
|
||||
<item>5</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>
|
||||
|
||||
<bool name="config_roundedCornerMultipleRadius">true</bool>
|
||||
|
||||
<!-- Configure 13px of extra protection around the front-facing camera -->
|
||||
<string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
|
||||
M 661,72
|
||||
a 57,57 0 1 0 114,0
|
||||
a 57,57 0 1 0 -114,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,69 @@
|
|||
<?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>
|
||||
<!-- for 20dp of padding at 3.5px/dp at default density -->
|
||||
<dimen name="rounded_corner_content_padding">50px</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 26 extra px of padding
|
||||
for the corners -->
|
||||
<dimen name="system_icons_super_container_avatarless_margin_end">26px</dimen>
|
||||
|
||||
<!-- Margin on the right side of the system icon group on Keyguard. -->
|
||||
<dimen name="system_icons_keyguard_padding_end">6.5dp</dimen>
|
||||
|
||||
<!-- A path similar to frameworks/base/core/res/res/values/config.xml
|
||||
config_mainBuiltInDisplayCutout that describes a path larger than the exact path of a display
|
||||
cutout. If present as well as config_enableDisplayCutoutProtection is set to true, then
|
||||
SystemUI will draw this "protection path" instead of the display cutout path that is normally
|
||||
used for anti-aliasing.
|
||||
|
||||
This path will only be drawn when the front-facing camera turns on, otherwise the main
|
||||
DisplayCutout path will be rendered
|
||||
-->
|
||||
<string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
|
||||
M 665,71
|
||||
a 57,57 0 1 0 114,0 57,57 0 1 0 -114,0
|
||||
Z
|
||||
</string>
|
||||
|
||||
<!-- Camera 1 is the front camera -->
|
||||
<string translatable="false" name="config_protectedCameraId">1</string>
|
||||
|
||||
<bool name="config_enableDisplayCutoutProtection">true</bool>
|
||||
|
||||
<!-- Location on the screen of the center of the physical power button. -->
|
||||
<dimen name="physical_power_button_center_screen_location_y">940px</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">1320px</dimen>
|
||||
<dimen name="physical_volume_down_button_center_screen_location_y">1520px</dimen>
|
||||
|
||||
<!-- Padding for the lock icon on the keyguard. In pixels - should not scale with display size. -->
|
||||
<dimen name="lock_icon_padding">68px</dimen>
|
||||
|
||||
<!-- Alpha in duration in ms for the auth ripple to become fully vislble. If set to 0, it is immediately visible. -->
|
||||
<integer name="auth_ripple_alpha_in_duration">0</integer>
|
||||
</resources>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue