display: tk4b: add display config settings

1. Add SystemUI config.xml.
2. Update the core config.xml.

Bug: 286064452
Bug: 286064567
Bug: 286064815

Test: Dump panel to check AOD state and dump display to check system
setting.

Change-Id: Iec431212a6130b1ca52621b13d9c03c5ca13aa2d
This commit is contained in:
gilliu 2023-08-31 07:45:25 +00:00
parent f060e6ff03
commit 568d65756d
2 changed files with 171 additions and 94 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
/* /*
** Copyright 2021, The Android Open Source Project ** Copyright 2023, The Android Open Source Project
** **
** Licensed under the Apache License, Version 2.0 (the "License"); ** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License. ** you may not use this file except in compliance with the License.
@ -27,7 +27,7 @@
<!-- Flag indicating whether the we should enable the automatic brightness in Settings. <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set --> Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">false</bool> <bool name="config_automatic_brightness_available">true</bool>
<!-- Minimum screen brightness allowed by the power manager. --> <!-- Minimum screen brightness allowed by the power manager. -->
<integer name="config_screenBrightnessDim">6</integer> <integer name="config_screenBrightnessDim">6</integer>
@ -42,7 +42,8 @@
<!-- Default screen brightness setting <!-- Default screen brightness setting
Must be in the range specified by minimum and maximum. --> Must be in the range specified by minimum and maximum. -->
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.17429718</item> <!-- 140 nits: (140-2)/(1200-2)*(0.67-0.0)+0.0 = 0.077178631 -->
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.077178631</item>
<!-- The default refresh rate. Pixel 6 manages this using the peak refresh rate setting, so set <!-- The default refresh rate. Pixel 6 manages this using the peak refresh rate setting, so set
this value to 0 so it has no effect. --> this value to 0 so it has no effect. -->
@ -51,21 +52,6 @@
<!-- The default peak refresh rate. --> <!-- The default peak refresh rate. -->
<integer name="config_defaultPeakRefreshRate">120</integer> <integer name="config_defaultPeakRefreshRate">120</integer>
<!-- Not allow to switch to higher refresh rate when display brightness setting is
equal or less than this value -->
<integer-array name="config_brightnessThresholdsOfPeakRefreshRate">
<item>2</item> <!-- 15% UI brightness -->
</integer-array>
<integer-array name="config_ambientThresholdsOfPeakRefreshRate">
<item>5</item>
</integer-array>
<!-- default refresh rate in the zone defined by birghtness and ambient thresholds -->
<integer name="config_defaultRefreshRateInZone">120</integer>
<!-- Default refresh rate while the device has high brightness mode enabled for HDR. -->
<integer name="config_defaultRefreshRateInHbmHdr">60</integer>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support. <!-- 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: The N entries of this array define N 1 zones as follows:
Zone 0: 0 <= LUX < array[0] Zone 0: 0 <= LUX < array[0]
@ -81,6 +67,7 @@
<item>4</item> <item>4</item>
<item>8</item> <item>8</item>
<item>12</item> <item>12</item>
<item>15</item>
<item>20</item> <item>20</item>
<item>33</item> <item>33</item>
<item>55</item> <item>55</item>
@ -91,10 +78,17 @@
<item>665</item> <item>665</item>
<item>1097</item> <item>1097</item>
<item>1808</item> <item>1808</item>
<item>2981</item> <item>3000</item>
<item>5000</item> <item>6000</item>
<item>9000</item>
<item>10000</item> <item>10000</item>
<item>14000</item>
<item>20000</item> <item>20000</item>
<item>25000</item>
<item>31000</item>
<item>51000</item>
<item>81000</item>
<item>100000</item>
</integer-array> </integer-array>
<!-- Array of desired screen brightness in nits corresponding to the lux values <!-- Array of desired screen brightness in nits corresponding to the lux values
@ -116,22 +110,30 @@
<item>18.34822964</item> <!-- 2 - 3 --> <item>18.34822964</item> <!-- 2 - 3 -->
<item>21.55068128</item> <!-- 3 - 4 --> <item>21.55068128</item> <!-- 3 - 4 -->
<item>24.0167788</item> <!-- 4 - 8 --> <item>24.0167788</item> <!-- 4 - 8 -->
<item>30.62162162</item> <!-- 8 - 12 --> <item>32.5</item> <!-- 8 - 12 -->
<item>35.09486396</item> <!-- 12 - 20 --> <item>46</item> <!-- 12 - 15 -->
<item>41.2249643</item> <!-- 20 - 33 --> <item>53.26923077</item> <!-- 15 - 20 -->
<item>47.6760716</item> <!-- 33 - 55 --> <item>54.61538462</item> <!-- 20 - 33 -->
<item>55.73002427</item> <!-- 55 - 90 --> <item>58.11538462</item> <!-- 33 - 55 -->
<item>66.24126116</item> <!-- 90 - 148 --> <item>62.1394</item> <!-- 55 - 90 -->
<item>67.13133333</item> <!-- 90 - 148 -->
<item>79.67614115</item> <!-- 148 - 245 --> <item>79.67614115</item> <!-- 148 - 245 -->
<item>98.04727274</item> <!-- 245 - 403 --> <item>98.04727274</item> <!-- 245 - 403 -->
<item>125.1221991</item> <!-- 403 - 665 --> <item>125.1221991</item> <!-- 403 - 665 -->
<item>161.6875093</item> <!-- 665 - 1097 --> <item>161.6875093</item> <!-- 665 - 1097 -->
<item>208.4885553</item> <!-- 1097 - 1808 --> <item>208.4885553</item> <!-- 1097 - 1808 -->
<item>264.8221315</item> <!-- 1808 - 2981 --> <item>264.8221315</item> <!-- 1808 - 3000 -->
<item>327.8974352</item> <!-- 2981 - 5000 --> <item>328.5869521</item> <!-- 3000 - 6000 -->
<item>401.1676739</item> <!-- 5000 - 10000 --> <item>627.4315413</item> <!-- 6000 - 9000 -->
<item>750.0</item> <!-- 10000 - 20000 --> <item>826.8584866</item> <!-- 9000 - 10000 -->
<item>900.0</item> <!-- 20000+ --> <item>867.85582302</item> <!-- 10000 - 14000 -->
<item>1041.39662279</item> <!-- 14000 - 20000 -->
<item>1227.52633489</item> <!-- 20000 - 25000 -->
<item>1331.28933608</item> <!-- 25000 - 31000 -->
<item>1414.57566867</item> <!-- 31000 - 51000 -->
<item>1553.22826182</item> <!-- 51000 - 81000 -->
<item>1614.01031782</item> <!-- 81000 - 100000 -->
<item>1800</item> <!-- 100000+ -->
</array> </array>
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used <!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
@ -231,6 +233,12 @@
<item>283</item> <item>283</item>
</integer-array> </integer-array>
<!-- The stable device width and height in pixels. If these aren't set to a positive number
then the device will use the width and height of the default display the first time it's
booted. -->
<integer name="config_stableDeviceDisplayWidth">1080</integer>
<integer name="config_stableDeviceDisplayHeight">2424</integer>
<!-- The max vibration strength allowed in audio haptic channels. --> <!-- The max vibration strength allowed in audio haptic channels. -->
<item name="config_hapticChannelMaxVibrationAmplitude" format="float" type="dimen">0.335</item> <item name="config_hapticChannelMaxVibrationAmplitude" format="float" type="dimen">0.335</item>
</resources> </resources>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2023, 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: 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>2</item> <!-- 1: NIGHT -->
<item>2</item> <!-- 2: LOW (2-1)/(255-1)*(1800-2)+2 = 9.08 nits -->
<item>8</item> <!-- 3: HIGH (8-1)/(255-1)*(1800-2)+2 = 51.55 nits -->
<item>8</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>
<!-- Configure 13px of extra protection around the front-facing camera -->
<string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
M 489.5,66
a 50,50 0 0 1 100,0
a 50,50 0 0 1 -100,0
Z
</string>
<!-- The time (in ms) needed to trigger the lock icon view's long-press affordance -->
<integer name="config_lockIconLongPress" translatable="false">100</integer>
<!-- Camera 1 is the front camera -->
<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>