Merge "Update rounded corner, cutout and display shape configs"
This commit is contained in:
commit
b9ede6869b
6 changed files with 157 additions and 3 deletions
|
@ -23,6 +23,9 @@ $(call inherit-product-if-exists, vendor/google_devices/zuma/proprietary/device-
|
|||
$(call inherit-product-if-exists, vendor/google_devices/shusky/proprietary/husky/device-vendor-husky.mk)
|
||||
$(call inherit-product-if-exists, vendor/qorvo/uwb/qm35-hal/Device.mk)
|
||||
|
||||
# display
|
||||
DEVICE_PACKAGE_OVERLAYS += device/google/shusky/husky/overlay
|
||||
|
||||
include device/google/shusky/audio/husky/audio-tables.mk
|
||||
include device/google/zuma/device-shipping-common.mk
|
||||
include device/google/shusky/vibrator/cs40l26/device-shusky.mk
|
||||
|
@ -227,9 +230,6 @@ PRODUCT_VENDOR_PROPERTIES += \
|
|||
persist.vendor.udfps.als_feed_forward_supported=true \
|
||||
persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
|
||||
|
||||
# display
|
||||
DEVICE_PACKAGE_OVERLAYS += device/google/shusky/husky/overlay
|
||||
|
||||
# config of display brightness dimming
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage?=1
|
||||
|
||||
|
|
|
@ -229,4 +229,42 @@
|
|||
<integer name="config_stableDeviceDisplayWidth">1344</integer>
|
||||
<integer name="config_stableDeviceDisplayHeight">2992</integer>
|
||||
|
||||
|
||||
<!-- 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 626.5,75.5
|
||||
a 45,45 0 1 0 90,0
|
||||
a 45,45 0 1 0 -90,0
|
||||
Z
|
||||
@left
|
||||
</string>
|
||||
|
||||
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
|
||||
M 615.5,0
|
||||
h 110
|
||||
v 151
|
||||
h -110
|
||||
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" translatable="false">M 119.9999 -3.7795276e-05 C 113.32402 0.34316186 102.8311 1.9200038 98.695215 2.8066029 C 73.98156 8.0987976 62.561448 13.566009 49.605371 22.5859 C 34.411306 33.163789 20.551075 49.59161 12.962793 65.706994 C 7.8660073 76.530983 2.8411097 93.439401 1.4120111 104.32809 C 0.066002501 114.58638 0.28550144 114.76397 -9.8267718e-05 119.99996 L -9.8267718e-05 2877 L 1.9803705 2891.3164 C 8.0676544 2919.9453 16.781085 2937.4625 33.785058 2955.2598 C 51.142521 2973.4268 70.876659 2983.6798 100.6835 2990.0176 L 114.9999 2992 L 1228.9999 2992 L 1243.3163 2990.0176 C 1273.1232 2983.6798 1292.8573 2973.4268 1310.2148 2955.2598 C 1327.2186 2937.4625 1335.9323 2919.9453 1342.0194 2891.3164 L 1343.9999 2877 L 1343.9999 119.99996 C 1343.7143 114.76397 1343.9338 114.58638 1342.5878 104.32809 C 1341.1587 93.439401 1336.1338 76.530983 1331.037 65.706994 C 1323.4487 49.59161 1309.5885 33.163789 1294.3944 22.5859 C 1281.4385 13.566009 1270.0183 8.0987976 1245.3046 2.8066029 C 1241.1687 1.9200038 1230.6758 0.34316186 1223.9999 -3.7795276e-05 L 119.9999 -3.7795276e-05 z</string>
|
||||
|
||||
</resources>
|
||||
|
|
33
husky/overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
33
husky/overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?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>
|
||||
|
||||
<!-- Height of the status bar.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
<dimen name="status_bar_height_default">28dp</dimen>
|
||||
<dimen name="status_bar_height_portrait">151px</dimen>
|
||||
<dimen name="status_bar_height_landscape">28dp</dimen>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
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="115px"
|
||||
android:height="115px"
|
||||
android:viewportWidth="115"
|
||||
android:viewportHeight="115">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="m 100.6831,1.9816622 c -29.806898,6.3378 -49.540698,16.5907998 -66.898198,34.7579998 -17.004,17.7973 -25.7170003,35.315 -31.8043003,63.943898 L -9.8267718e-5,114.99996 V -3.7795276e-5 H 114.9999 L 100.6834,1.9814622 Z"/>
|
||||
</vector>
|
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
Copyright (C) 2022 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="120px"
|
||||
android:height="120px"
|
||||
android:viewportWidth="12"
|
||||
android:viewportHeight="12">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M 0.1412,10.432865 C 0.28411,9.343999 0.78655,7.653078 1.29623,6.570671 2.05506,4.959135 3.44108,3.316382 4.96049,2.258588 6.2561,1.356598 7.39814,0.809879 9.86951,0.280664 10.2831,0.192 11.33241,0.03432 12,0 H 0 V 11.999999 C 0.02856,11.4764 0.0066,11.458694 0.1412,10.432865 Z"/>
|
||||
</vector>
|
|
@ -0,0 +1,39 @@
|
|||
<?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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
<!-- Configure 13px of extra protection around the front-facing camera -->
|
||||
<string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
|
||||
M 613.5,75.5
|
||||
a 58,58 0 0 1 116,0
|
||||
a 58,58 0 0 1 -116,0
|
||||
Z
|
||||
</string>
|
||||
|
||||
<!-- Camera 0 is the front camera -->
|
||||
<string translatable="false" name="config_protectedCameraId">0</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>
|
Loading…
Add table
Add a link
Reference in a new issue