lisa: overlay: Configure display cutout and rounded corners
Change-Id: I4773f8c2a4678b70ffea05831c7d4843c534f818
This commit is contained in:
parent
bc5475b865
commit
f68cd82f3b
@ -7,6 +7,10 @@
|
|||||||
# Inherit from sm8350-common
|
# Inherit from sm8350-common
|
||||||
$(call inherit-product, device/xiaomi/sm8350-common/common.mk)
|
$(call inherit-product, device/xiaomi/sm8350-common/common.mk)
|
||||||
|
|
||||||
|
# Overlays
|
||||||
|
DEVICE_PACKAGE_OVERLAYS += \
|
||||||
|
$(LOCAL_PATH)/overlay
|
||||||
|
|
||||||
# Soong namespaces
|
# Soong namespaces
|
||||||
PRODUCT_SOONG_NAMESPACES += \
|
PRODUCT_SOONG_NAMESPACES += \
|
||||||
$(LOCAL_PATH)
|
$(LOCAL_PATH)
|
||||||
|
26
overlay/frameworks/base/core/res/res/values/config.xml
Normal file
26
overlay/frameworks/base/core/res/res/values/config.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2021 The LineageOS Project
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- 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.
|
||||||
|
Example for a 10px x 10px square top-center cutout:
|
||||||
|
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z</string>
|
||||||
|
Example for a 10dp x 10dp square top-center cutout:
|
||||||
|
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z @dp</string>
|
||||||
|
@see https://www.w3.org/TR/SVG/paths.html#PathData
|
||||||
|
-->
|
||||||
|
<string name="config_mainBuiltInDisplayCutout">
|
||||||
|
M 0,0 H 144 V 104 H 0 V 0 Z @left
|
||||||
|
</string>
|
||||||
|
</resources>
|
15
overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
15
overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2021 The LineageOS Project
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Radius of the software rounded corners at the top of the display in its natural
|
||||||
|
orientation. If zero, the value of rounded_corner_radius is used. -->
|
||||||
|
<dimen name="rounded_corner_radius_top">102px</dimen>
|
||||||
|
|
||||||
|
<!-- Radius of the software rounded corners at the bottom of the display in its natural
|
||||||
|
orientation. If zero, the value of rounded_corner_radius is used. -->
|
||||||
|
<dimen name="rounded_corner_radius_bottom">102px</dimen>
|
||||||
|
</resources>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2021 The LineageOS Project
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<dimen name="rounded_corner_content_padding">47px</dimen>
|
||||||
|
</resources>
|
Loading…
Reference in New Issue
Block a user