From f1c1b5044abb45bb70655d1c792a0ce79dea735b Mon Sep 17 00:00:00 2001 From: Chenyang Zhong Date: Sun, 6 Mar 2022 02:40:06 -0500 Subject: [PATCH] venus: configs: ship displayconfig for brightness ramp rate Android 12 allows the brightness ramp rate to be changed separately for fast/slow and increase/decrease in float. Once loaded, DisplayDeviceConfig has higher priority than the integer config values in frameworks. The format definition is in [1]. There are 3 variants for the filename: * display_id_46xxxxx.xml * display_19xxxxx.xml * display_port_xxx.xml The value can be found in boot logs by grepping DisplayDeviceInfo. On android 12, boot log reports the 46xxxxx value of the first variant. The xml file can be put in either product or vendor. [1] frameworks/base/services/core/xsd/display-device-config/display-device-config.xsd Signed-off-by: Chenyang Zhong --- configs/display_id_4630946736638489730.xml | 29 ++++++++++++++++++++++ device.mk | 4 +++ 2 files changed, 33 insertions(+) create mode 100644 configs/display_id_4630946736638489730.xml diff --git a/configs/display_id_4630946736638489730.xml b/configs/display_id_4630946736638489730.xml new file mode 100644 index 0000000..31c75c3 --- /dev/null +++ b/configs/display_id_4630946736638489730.xml @@ -0,0 +1,29 @@ + + + + 0.5 + 0.5 + 0.04 + 0.05 + + + 0.0 + 2 + + + 1.0 + 1000.0 + + + \ No newline at end of file diff --git a/device.mk b/device.mk index 9f883df..b066a37 100644 --- a/device.mk +++ b/device.mk @@ -10,6 +10,10 @@ $(call inherit-product, device/xiaomi/sm8350-common/common.mk) # Inherit from miuicamera-venus $(call inherit-product-if-exists, device/xiaomi/miuicamera-venus/device.mk) +# Display Device Config +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/display_id_4630946736638489730.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/displayconfig/display_id_4630946736638489730.xml + # Fingerprint PRODUCT_PACKAGES += \ libudfpshandler