pipa: Update screen brightness overlays

* From stock

Change-Id: Ia1aa7ef8db68286f44042831f5381ba1630275e9
This commit is contained in:
luka177
2023-10-13 23:56:29 +02:00
committed by Sebastiano Barezzi
parent b4f08cfd8e
commit b31dba70a6

View File

@@ -19,10 +19,6 @@
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
<!-- True if the display hardware only has brightness buckets rather than a full range of
backlight values -->
<bool name="config_displayBrightnessBucketsInDoze">true</bool>
<!-- Whether the always on display mode is available. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
@@ -120,65 +116,232 @@
This array should have size one greater than the size of the config_autoBrightnessLevels
array. The brightness values must be non-negative and non-decreasing. This must be
overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessDisplayValuesNits">
<item>5</item>
<item>5</item>
<item>5</item>
<item>17</item>
<item>24</item>
<item>31</item>
<item>34</item>
<item>46</item>
<item>59</item>
<item>76</item>
<item>81</item>
<item>82</item>
<item>82</item>
<item>82</item>
<item>83</item>
<item>83</item>
<item>83</item>
<item>84</item>
<item>84</item>
<item>85</item>
<item>85</item>
<item>85</item>
<item>85</item>
<item>86</item>
<item>86</item>
<item>87</item>
<item>89</item>
<item>90</item>
<item>91</item>
<item>93</item>
<item>94</item>
<item>96</item>
<item>97</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>108</item>
<item>109</item>
<array name="config_autoBrightnessDisplayValuesNits">
<item>4.9</item>
<item>6.7</item>
<item>8.1</item>
<item>16.8</item>
<item>22.6</item>
<item>28.4</item>
<item>37.8</item>
<item>54.6</item>
<item>74.6</item>
<item>91.4</item>
<item>101.9</item>
<item>102.9</item>
<item>102.9</item>
<item>102.9</item>
<item>104.0</item>
<item>104.0</item>
<item>105.0</item>
<item>105.0</item>
<item>105.0</item>
<item>106.1</item>
<item>106.1</item>
<item>107.1</item>
<item>108.2</item>
<item>108.2</item>
<item>108.2</item>
<item>111.3</item>
<item>113.4</item>
<item>115.5</item>
<item>117.6</item>
<item>119.7</item>
<item>121.8</item>
<item>123.9</item>
<item>125.0</item>
<item>128.1</item>
<item>129.2</item>
<item>131.3</item>
<item>134.4</item>
<item>136.5</item>
<item>137.6</item>
<item>140.7</item>
<item>142.8</item>
<item>143.9</item>
<item>147.0</item>
<item>149.1</item>
<item>151.2</item>
<item>177.5</item>
<item>205.8</item>
<item>233.1</item>
<item>260.4</item>
<item>283.5</item>
<item>315.0</item>
<item>336.0</item>
<item>351.8</item>
<item>420.0</item>
<item>437.5</item>
<item>440.0</item>
<item>442.0</item>
<item>444.0</item>
<item>446.0</item>
<item>448.0</item>
<item>450.0</item>
<item>470.0</item>
<item>490.0</item>
<item>520.0</item>
<item>563.0</item>
<item>575.0</item>
<item>588.0</item>
<item>600.0</item>
<item>610.0</item>
<item>620.0</item>
<item>630.0</item>
<item>640.0</item>
<item>650.0</item>
<item>660.0</item>
<item>670.0</item>
<item>680.0</item>
<item>690.0</item>
<item>700.0</item>
<item>705.0</item>
<item>710.0</item>
<item>715.0</item>
<item>720.0</item>
<item>725.0</item>
<item>730.0</item>
<item>735.0</item>
<item>740.0</item>
<item>745.0</item>
<item>750.0</item>
<item>755.0</item>
<item>760.0</item>
<item>765.0</item>
<item>770.0</item>
<item>775.0</item>
<item>800.0</item>
<item>817.0</item>
<item>833.0</item>
<item>850.0</item>
<item>867.0</item>
<item>883.0</item>
<item>900.0</item>
<item>913.0</item>
<item>925.0</item>
<item>938.0</item>
<item>950.0</item>
<item>963.0</item>
<item>975.0</item>
<item>988.0</item>
<item>1000.0</item>
</array>
<!-- Array of output values for LCD backlight corresponding to the lux values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
The brightness values must be between 0 and 255 and be non-decreasing.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>21</item>
<item>40</item>
<item>77</item>
<item>111</item>
<item>112</item>
<item>114</item>
<item>116</item>
<item>137</item>
<item>157</item>
<item>180</item>
<item>205</item>
<item>226</item>
<item>257</item>
<item>280</item>
<item>295</item>
<item>369</item>
<item>434</item>
<item>500</item>
<item>500</item>
<item>133</item>
<item>175</item>
<item>245</item>
<item>302</item>
<item>322</item>
<item>358</item>
<item>382</item>
<item>404</item>
<item>406</item>
<item>407</item>
<item>408</item>
<item>409</item>
<item>412</item>
<item>414</item>
<item>416</item>
<item>417</item>
<item>419</item>
<item>420</item>
<item>423</item>
<item>426</item>
<item>428</item>
<item>432</item>
<item>442</item>
<item>449</item>
<item>456</item>
<item>458</item>
<item>466</item>
<item>472</item>
<item>479</item>
<item>486</item>
<item>494</item>
<item>500</item>
<item>507</item>
<item>516</item>
<item>522</item>
<item>530</item>
<item>536</item>
<item>545</item>
<item>550</item>
<item>559</item>
<item>565</item>
<item>674</item>
<item>783</item>
<item>905</item>
<item>1028</item>
<item>1152</item>
<item>1284</item>
<item>1418</item>
<item>1600</item>
<item>1760</item>
<item>1900</item>
<item>2000</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
<item>2047</item>
</integer-array>
<!-- Array of light sensor lux values to define our levels for auto backlight brightness support.
@@ -255,118 +418,56 @@
<item>3500</item>
<item>4000</item>
<item>4500</item>
</integer-array>
<!-- Array of hysteresis constraint values for darkening, represented as tenths of a
percent. The length of this array is assumed to be one greater than
config_screenThresholdLevels. The darkening threshold is calculated as
screenBrightness * (1.0f - CONSTRAINT_VALUE). When the new screen brightness is lower than
this threshold, it is applied. See the config_screenThresholdLevels description for how
the constraint value is chosen. -->
<integer-array name="config_screenBrightnessBacklight">
<item>2</item>
<item>3</item>
<item>10</item>
<item>15</item>
<item>30</item>
<item>45</item>
<item>60</item>
<item>75</item>
<item>90</item>
<item>105</item>
<item>120</item>
<item>135</item>
<item>150</item>
<item>165</item>
<item>180</item>
<item>195</item>
<item>210</item>
<item>225</item>
<item>240</item>
<item>255</item>
</integer-array>
<!-- An array of floats describing the screen brightness in nits corresponding to the backlight
values in the config_screenBrightnessBacklight array. On OLED displays these values
should be measured with an all white image while the display is in the fully on state.
Note that this value should *not* reflect the maximum brightness value for any high
brightness modes but only the maximum brightness value obtainable in a sustainable manner.
This array should be equal in size to config_screenBrightnessBacklight -->
<integer-array name="config_screenBrightnessNits">
<item>2</item>
<item>4</item>
<item>22</item>
<item>30</item>
<item>68</item>
<item>95</item>
<item>133</item>
<item>165</item>
<item>192</item>
<item>218</item>
<item>255</item>
<item>290</item>
<item>326</item>
<item>352</item>
<item>384</item>
<item>399</item>
<item>422</item>
<item>432</item>
<item>442</item>
<item>455</item>
</integer-array>
<!-- Array of hysteresis constraint values for brightening, represented as tenths of a
percent. The length of this array is assumed to be one greater than
config_dynamicHysteresisLuxLevels. The brightening threshold is calculated as
lux * (1.0f + CONSTRAINT_VALUE). When the current lux is higher than this threshold,
the screen brightness is recalculated. See the config_dynamicHysteresisLuxLevels
description for how the constraint value is chosen. -->
<integer-array name="config_dynamicHysteresisBrightLevels">
<item>2000</item>
<item>2000</item>
<item>1000</item>
<item>1000</item>
<item>500</item>
<item>500</item>
<item>500</item>
<item>500</item>
</integer-array>
<!-- Array of hysteresis constraint values for darkening, represented as tenths of a
percent. The length of this array is assumed to be one greater than
config_dynamicHysteresisLuxLevels. The darkening threshold is calculated as
lux * (1.0f - CONSTRAINT_VALUE). When the current lux is lower than this threshold,
the screen brightness is recalculated. See the config_dynamicHysteresisLuxLevels
description for how the constraint value is chosen. -->
<integer-array name="config_dynamicHysteresisDarkLevels">
<item>800</item>
<item>800</item>
<item>800</item>
<item>800</item>
<item>800</item>
<item>500</item>
<item>500</item>
<item>500</item>
</integer-array>
<!-- Array of ambient lux threshold values. This is used for determining hysteresis constraint
values by calculating the index to use for lookup and then setting the constraint value
to the corresponding value of the array. The new brightening hysteresis constraint value
is the n-th element of config_dynamicHysteresisBrightLevels, and the new darkening
hysteresis constraint value is the n-th element of config_dynamicHysteresisDarkLevels.
The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
condition calculated index
value < lux[0] 0
lux[n] <= value < lux[n+1] n+1
lux[MAX] <= value MAX+1 -->
<integer-array name="config_dynamicHysteresisLuxLevels">
<item>2</item>
<item>10</item>
<item>30</item>
<item>100</item>
<item>800</item>
<item>2000</item>
<item>4000</item>
<item>5000</item>
<item>5500</item>
<item>6000</item>
<item>6500</item>
<item>7000</item>
<item>7500</item>
<item>8000</item>
<item>8500</item>
<item>9000</item>
<item>9500</item>
<item>10000</item>
<item>10500</item>
<item>11000</item>
<item>11500</item>
<item>12000</item>
<item>12500</item>
<item>13000</item>
<item>13500</item>
<item>14000</item>
<item>14500</item>
<item>15000</item>
<item>16000</item>
<item>17000</item>
<item>18000</item>
<item>19000</item>
<item>20000</item>
<item>21000</item>
<item>22000</item>
<item>23000</item>
<item>24000</item>
<item>25000</item>
<item>26000</item>
<item>27000</item>
<item>28000</item>
<item>29000</item>
<item>30000</item>
<item>35000</item>
<item>40000</item>
<item>45000</item>
<item>50000</item>
<item>55000</item>
<item>60000</item>
<item>65000</item>
<item>70000</item>
<item>75000</item>
<item>80000</item>
<item>85000</item>
<item>90000</item>
<item>95000</item>
<item>100000</item>
</integer-array>
<!-- Array of hysteresis constraint values for brightening, represented as tenths of a
@@ -375,6 +476,7 @@
screenBrightness * (1.0f + CONSTRAINT_VALUE). When the new screen brightness is higher
than this threshold, it is applied. See the config_screenThresholdLevels description for
how the constraint value is chosen. -->
<integer-array name="config_screenBrighteningThresholds">
<item>0</item>
</integer-array>
@@ -385,95 +487,29 @@
screenBrightness * (1.0f - CONSTRAINT_VALUE). When the new screen brightness is lower than
this threshold, it is applied. See the config_screenThresholdLevels description for how
the constraint value is chosen. -->
<integer-array name="config_screenDarkeningThresholds">
<item>0</item>
</integer-array>
<!-- The maximum range of gamma adjustment possible using the screen
auto-brightness adjustment setting. -->
<fraction name="config_autoBrightnessAdjustmentMaxGamma">100%</fraction>
<!-- Array of screen brightness threshold values. This is used for determining hysteresis
constraint values by calculating the index to use for lookup and then setting the
constraint value to the corresponding value of the array. The new brightening hysteresis
constraint value is the n-th element of config_screenBrighteningThresholds, and the new
darkening hysteresis constraint value is the n-th element of
config_screenDarkeningThresholds.
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
for debouncing the light sensor. Different constants are used to debounce the light sensor
when adapting to brighter or darker environments. This parameter controls how quickly
brightness changes occur in response to an observed change in light level that exceeds the
hysteresis threshold. -->
<integer name="config_autoBrightnessBrighteningLightDebounce">1000</integer>
<integer name="config_autoBrightnessDarkeningLightDebounce">1000</integer>
Historically, it has been assumed that this will be an integer array with values in the
range of [0, 255]. However, it is now assumed to be a float array with values in the
range of [0, 1]. To accommodate both the possibilities, we internally check the scale on
which the thresholds are defined, and calibrate it accordingly.
<!-- Maximum screen brightness allowed by the power manager.
The user is forbidden from setting the brightness above this level. -->
<integer name="config_screenBrightnessSettingMaximum">255</integer>
The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
condition calculated index
value < level[0] 0
level[n] <= value < level[n+1] n+1
level[MAX] <= value MAX+1 -->
<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">2</integer>
<array name="config_screenThresholdLevels" />
<!-- Minimum screen brightness allowed by the power manager. -->
<integer name="config_screenBrightnessDim">6</integer>
<!-- 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. Optionally, you can append either `@left` or `@right` to the
end of the path string, in order to change the path origin to either the top left,
or top right 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 translatable="false" name="config_mainBuiltInDisplayCutout">
M 514,52
a 20,20 0 1 0 52,0
a 20,20 0 1 0 -52,0
Z
@left
</string>
<!-- Like config_mainBuiltInDisplayCutout, but this path is used to report the
one single bounding rect per device edge to the app via
{@link DisplayCutout#getBoundingRect}. Note that this path should try to match the visual
appearance of the cutout as much as possible, and may be smaller than
config_mainBuiltInDisplayCutout
-->
<string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
M 493.5,0
h 95
v 95
h -95
Z
@left
</string>
<!-- 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>
<!-- If true, the display will be shifted around in ambient mode. -->
<bool name="config_enableBurnInProtection">true</bool>
<!-- Indicates whether device has a power button fingerprint sensor. -->
<bool name="config_is_powerbutton_fps" translatable="false">true</bool>
<!-- An array of arrays of side fingerprint sensor properties relative to each display.
Note: this value is temporary and is expected to be queried directly
from the HAL in the future. -->
<array name="config_sfps_sensor_props" translatable="false">
<item>@array/config_sfps_sensor_props_0</item>
</array>
<array name="config_sfps_sensor_props_0" translatable="false">
<item>local:4630946736638489729</item>
<item>1080</item>
<item>965</item>
<item>115</item>
</array>
</resources>