unicorn: overlay: Decommonize brightness overlays
Change-Id: I830e690f92454b58833937646eb8a166cfdad5ea
This commit is contained in:
		@@ -1,11 +1,377 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<!--
 | 
			
		||||
     Copyright (C) 2023 The LineageOS Project
 | 
			
		||||
     Copyright (C) 2024 The LineageOS Project
 | 
			
		||||
     SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
-->
 | 
			
		||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
 | 
			
		||||
    <integer name="config_udfps_illumination_transition_ms">0</integer>
 | 
			
		||||
 | 
			
		||||
    <!-- Minimum screen brightness setting allowed by power manager.
 | 
			
		||||
         -2 is invalid so setting will resort to int value specified above.
 | 
			
		||||
         Set this to 0.0 to allow screen to go to minimal brightness.
 | 
			
		||||
         The user is forbidden from setting the brightness below this level. -->
 | 
			
		||||
    <item format="float" name="config_screenBrightnessSettingMinimumFloat" type="dimen">0.000854597</item>
 | 
			
		||||
 | 
			
		||||
    <!-- Maximum screen brightness allowed by the power manager.
 | 
			
		||||
         -2 is invalid so setting will resort to int value specified above.
 | 
			
		||||
         Set this to 1.0 for maximum brightness range.
 | 
			
		||||
         The user is forbidden from setting the brightness above this level. -->
 | 
			
		||||
    <item format="float" name="config_screenBrightnessSettingMaximumFloat" type="dimen">1</item>
 | 
			
		||||
 | 
			
		||||
    <!-- Default screen brightness setting set.
 | 
			
		||||
         -2 is invalid so setting will resort to int value specified above.
 | 
			
		||||
         Must be in the range specified by minimum and maximum. -->
 | 
			
		||||
    <item format="float" name="config_screenBrightnessSettingDefaultFloat" type="dimen">0.07496032</item>
 | 
			
		||||
 | 
			
		||||
    <!-- 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>
 | 
			
		||||
 | 
			
		||||
    <!-- The maximum range of gamma adjustment possible using the screen
 | 
			
		||||
         auto-brightness adjustment setting. -->
 | 
			
		||||
    <fraction name="config_autoBrightnessAdjustmentMaxGamma">100.0%</fraction>
 | 
			
		||||
    <item format="float" name="config_screenBrightnessDimFloat" type="dimen">0.000854597</item>
 | 
			
		||||
 | 
			
		||||
    <!-- Array of light sensor lux values to define our levels for auto backlight brightness support.
 | 
			
		||||
         The N entries of this array define N + 1 control points as follows:
 | 
			
		||||
         (1-based arrays)
 | 
			
		||||
 | 
			
		||||
         Point 1:            (0, value[1]):             lux <= 0
 | 
			
		||||
         Point 2:     (level[1], value[2]):  0        < lux <= level[1]
 | 
			
		||||
         Point 3:     (level[2], value[3]):  level[2] < lux <= level[3]
 | 
			
		||||
         ...
 | 
			
		||||
         Point N+1: (level[N], value[N+1]):  level[N] < lux
 | 
			
		||||
 | 
			
		||||
         The control points must be strictly increasing.  Each control point
 | 
			
		||||
         corresponds to an entry in the brightness backlight values arrays.
 | 
			
		||||
         For example, if lux == level[1] (first element of the levels array)
 | 
			
		||||
         then the brightness will be determined by value[2] (second element
 | 
			
		||||
         of the brightness values array).
 | 
			
		||||
 | 
			
		||||
         Spline interpolation is used to determine the auto-brightness
 | 
			
		||||
         backlight values for lux levels between these control points.
 | 
			
		||||
 | 
			
		||||
         Must be overridden in platform specific overlays -->
 | 
			
		||||
    <integer-array name="config_autoBrightnessLevels">
 | 
			
		||||
        <item>1</item>
 | 
			
		||||
        <item>2</item>
 | 
			
		||||
        <item>4</item>
 | 
			
		||||
        <item>6</item>
 | 
			
		||||
        <item>8</item>
 | 
			
		||||
        <item>10</item>
 | 
			
		||||
        <item>15</item>
 | 
			
		||||
        <item>20</item>
 | 
			
		||||
        <item>25</item>
 | 
			
		||||
        <item>30</item>
 | 
			
		||||
        <item>35</item>
 | 
			
		||||
        <item>40</item>
 | 
			
		||||
        <item>45</item>
 | 
			
		||||
        <item>50</item>
 | 
			
		||||
        <item>55</item>
 | 
			
		||||
        <item>60</item>
 | 
			
		||||
        <item>65</item>
 | 
			
		||||
        <item>70</item>
 | 
			
		||||
        <item>75</item>
 | 
			
		||||
        <item>80</item>
 | 
			
		||||
        <item>85</item>
 | 
			
		||||
        <item>90</item>
 | 
			
		||||
        <item>95</item>
 | 
			
		||||
        <item>100</item>
 | 
			
		||||
        <item>120</item>
 | 
			
		||||
        <item>140</item>
 | 
			
		||||
        <item>160</item>
 | 
			
		||||
        <item>180</item>
 | 
			
		||||
        <item>200</item>
 | 
			
		||||
        <item>220</item>
 | 
			
		||||
        <item>240</item>
 | 
			
		||||
        <item>260</item>
 | 
			
		||||
        <item>280</item>
 | 
			
		||||
        <item>300</item>
 | 
			
		||||
        <item>320</item>
 | 
			
		||||
        <item>340</item>
 | 
			
		||||
        <item>360</item>
 | 
			
		||||
        <item>380</item>
 | 
			
		||||
        <item>400</item>
 | 
			
		||||
        <item>420</item>
 | 
			
		||||
        <item>440</item>
 | 
			
		||||
        <item>460</item>
 | 
			
		||||
        <item>480</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>700</item>
 | 
			
		||||
        <item>900</item>
 | 
			
		||||
        <item>1100</item>
 | 
			
		||||
        <item>1300</item>
 | 
			
		||||
        <item>1500</item>
 | 
			
		||||
        <item>1700</item>
 | 
			
		||||
        <item>1900</item>
 | 
			
		||||
        <item>2000</item>
 | 
			
		||||
        <item>2500</item>
 | 
			
		||||
        <item>3000</item>
 | 
			
		||||
        <item>3500</item>
 | 
			
		||||
        <item>4000</item>
 | 
			
		||||
        <item>4500</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 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" />
 | 
			
		||||
 | 
			
		||||
    <!-- Array of desired screen brightness in nits corresponding to the lux values
 | 
			
		||||
         in the config_autoBrightnessLevels array. The display brightness is defined as the measured
 | 
			
		||||
         brightness of an all-white image.
 | 
			
		||||
 | 
			
		||||
         If this is defined then:
 | 
			
		||||
            - config_autoBrightnessLcdBacklightValues should not be defined
 | 
			
		||||
            - config_screenBrightnessNits must be defined
 | 
			
		||||
            - config_screenBrightnessBacklight must be defined
 | 
			
		||||
 | 
			
		||||
         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 -->
 | 
			
		||||
    <array name="config_autoBrightnessDisplayValuesNits">
 | 
			
		||||
        <item>3.9</item>
 | 
			
		||||
        <item>4.6</item>
 | 
			
		||||
        <item>5.3</item>
 | 
			
		||||
        <item>17.6</item>
 | 
			
		||||
        <item>24.3</item>
 | 
			
		||||
        <item>29.7</item>
 | 
			
		||||
        <item>34.0</item>
 | 
			
		||||
        <item>46.0</item>
 | 
			
		||||
        <item>59.0</item>
 | 
			
		||||
        <item>76.0</item>
 | 
			
		||||
        <item>81.0</item>
 | 
			
		||||
        <item>82.0</item>
 | 
			
		||||
        <item>82.0</item>
 | 
			
		||||
        <item>82.0</item>
 | 
			
		||||
        <item>83.0</item>
 | 
			
		||||
        <item>83.0</item>
 | 
			
		||||
        <item>83.0</item>
 | 
			
		||||
        <item>84.0</item>
 | 
			
		||||
        <item>84.0</item>
 | 
			
		||||
        <item>85.0</item>
 | 
			
		||||
        <item>85.0</item>
 | 
			
		||||
        <item>85.0</item>
 | 
			
		||||
        <item>85.0</item>
 | 
			
		||||
        <item>86.0</item>
 | 
			
		||||
        <item>86.0</item>
 | 
			
		||||
        <item>87.0</item>
 | 
			
		||||
        <item>89.0</item>
 | 
			
		||||
        <item>90.0</item>
 | 
			
		||||
        <item>91.0</item>
 | 
			
		||||
        <item>93.0</item>
 | 
			
		||||
        <item>94.0</item>
 | 
			
		||||
        <item>96.0</item>
 | 
			
		||||
        <item>97.0</item>
 | 
			
		||||
        <item>99.0</item>
 | 
			
		||||
        <item>100.0</item>
 | 
			
		||||
        <item>101.0</item>
 | 
			
		||||
        <item>104.0</item>
 | 
			
		||||
        <item>105.0</item>
 | 
			
		||||
        <item>106.0</item>
 | 
			
		||||
        <item>108.0</item>
 | 
			
		||||
        <item>109.0</item>
 | 
			
		||||
        <item>111.0</item>
 | 
			
		||||
        <item>112.0</item>
 | 
			
		||||
        <item>114.0</item>
 | 
			
		||||
        <item>116.0</item>
 | 
			
		||||
        <item>137.0</item>
 | 
			
		||||
        <item>157.0</item>
 | 
			
		||||
        <item>180.0</item>
 | 
			
		||||
        <item>205.0</item>
 | 
			
		||||
        <item>226.0</item>
 | 
			
		||||
        <item>257.0</item>
 | 
			
		||||
        <item>280.0</item>
 | 
			
		||||
        <item>295.0</item>
 | 
			
		||||
        <item>369.0</item>
 | 
			
		||||
        <item>400.0</item>
 | 
			
		||||
        <item>416.7</item>
 | 
			
		||||
        <item>433.3</item>
 | 
			
		||||
        <item>450.0</item>
 | 
			
		||||
        <item>466.7</item>
 | 
			
		||||
        <item>483.3</item>
 | 
			
		||||
        <item>500.0</item>
 | 
			
		||||
        <item>512.5</item>
 | 
			
		||||
        <item>525.0</item>
 | 
			
		||||
        <item>537.5</item>
 | 
			
		||||
        <item>550.0</item>
 | 
			
		||||
        <item>562.5</item>
 | 
			
		||||
        <item>575.0</item>
 | 
			
		||||
        <item>587.5</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>816.7</item>
 | 
			
		||||
        <item>833.3</item>
 | 
			
		||||
        <item>850.0</item>
 | 
			
		||||
        <item>866.7</item>
 | 
			
		||||
        <item>883.3</item>
 | 
			
		||||
        <item>900.0</item>
 | 
			
		||||
        <item>914.3</item>
 | 
			
		||||
        <item>928.6</item>
 | 
			
		||||
        <item>942.9</item>
 | 
			
		||||
        <item>957.1</item>
 | 
			
		||||
        <item>971.4</item>
 | 
			
		||||
        <item>985.7</item>
 | 
			
		||||
        <item>1000.0</item>
 | 
			
		||||
    </array>
 | 
			
		||||
 | 
			
		||||
    <!-- An array describing the screen's backlight values corresponding to the brightness
 | 
			
		||||
         values in the config_screenBrightnessNits array.
 | 
			
		||||
 | 
			
		||||
         This array should be equal in size to config_screenBrightnessBacklight. -->
 | 
			
		||||
    <integer-array name="config_screenBrightnessBacklight">
 | 
			
		||||
        <item>1</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 -->
 | 
			
		||||
    <array name="config_screenBrightnessNits">
 | 
			
		||||
        <item>3.9</item>
 | 
			
		||||
        <item>1000.0</item>
 | 
			
		||||
    </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_ambientBrighteningThresholds, and the new darkening
 | 
			
		||||
         hysteresis constraint value is the n-th element of config_ambientDarkeningThresholds.
 | 
			
		||||
 | 
			
		||||
         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 -->
 | 
			
		||||
    <integer-array name="config_ambientThresholdLevels">
 | 
			
		||||
        <item>2</item>
 | 
			
		||||
        <item>10</item>
 | 
			
		||||
        <item>30</item>
 | 
			
		||||
        <item>100</item>
 | 
			
		||||
        <item>800</item>
 | 
			
		||||
        <item>2000</item>
 | 
			
		||||
        <item>4000</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_ambientThresholdLevels. 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_ambientThresholdLevels
 | 
			
		||||
         description for how the constraint value is chosen. -->
 | 
			
		||||
    <integer-array name="config_ambientBrighteningThresholds">
 | 
			
		||||
        <item>2</item>
 | 
			
		||||
        <item>6</item>
 | 
			
		||||
        <item>10</item>
 | 
			
		||||
        <item>30</item>
 | 
			
		||||
        <item>100</item>
 | 
			
		||||
        <item>400</item>
 | 
			
		||||
        <item>600</item>
 | 
			
		||||
        <item>1000</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_ambientThresholdLevels. 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_ambientThresholdLevels
 | 
			
		||||
         description for how the constraint value is chosen. -->
 | 
			
		||||
    <integer-array name="config_ambientDarkeningThresholds">
 | 
			
		||||
        <item>800</item>
 | 
			
		||||
        <item>800</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
        <item>500</item>
 | 
			
		||||
    </integer-array>
 | 
			
		||||
 | 
			
		||||
    <!-- Type of the udfps long press sensor. Empty if long press is not supported. -->
 | 
			
		||||
    <string name="config_dozeUdfpsLongPressSensorType" translatable="false">org.lineageos.sensor.udfps</string>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<!--
 | 
			
		||||
     Copyright (C) 2023 The LineageOS Project
 | 
			
		||||
     Copyright (C) 2024 The LineageOS Project
 | 
			
		||||
     SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
-->
 | 
			
		||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user