android_device_xiaomi_sdm66.../configs/displayconfig/display_id_0.xml
Chenyang Zhong 77fa9fca99 sdm660-common: displayconfig: Add 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].

The value can be found in boot logs by grepping DisplayDeviceInfo.
On android 11, boot log reports the 19xxxxx value of the second
variant. 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

[clarencelol: Adjust accordingly based on brightness minimum and nits in overlay]
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
2022-03-26 11:56:35 +01:00

33 lines
1.2 KiB
XML

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<!-- Copyright (C) 2020 Google Inc.
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.
-->
<displayConfiguration>
<screenBrightnessRampFastDecrease>0.5</screenBrightnessRampFastDecrease>
<screenBrightnessRampFastIncrease>0.5</screenBrightnessRampFastIncrease>
<screenBrightnessRampSlowDecrease>0.04</screenBrightnessRampSlowDecrease>
<screenBrightnessRampSlowIncrease>0.05</screenBrightnessRampSlowIncrease>
<screenBrightnessMap>
<point>
<value>0.0</value>
<nits>1.0</nits>
</point>
<point>
<value>1.0</value>
<nits>420.0</nits>
</point>
</screenBrightnessMap>
</displayConfiguration>