instantnoodlep: Pull auto-brightness values from OOS

Change-Id: If174ffcbdbe3f2d11955763965a2eccc2c8a46d8
This commit is contained in:
ultranoob-5 2021-02-02 18:27:21 +05:30 committed by Łukasz Patron
parent bf60d86bc1
commit ced25a6b00

View File

@ -21,6 +21,53 @@
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
<!-- 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>600</item>
<item>300</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>600</item>
<item>300</item>
</integer-array>
<!-- 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.
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>15</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. -->
<array name="config_screenDarkeningThresholds">
<item>0</item>
</array>
<!-- 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)
@ -46,18 +93,26 @@
<item>4</item>
<item>12</item>
<item>20</item>
<item>40</item>
<item>65</item>
<item>95</item>
<item>140</item>
<item>200</item>
<item>350</item>
<item>650</item>
<item>1300</item>
<item>28</item>
<item>47</item>
<item>63</item>
<item>86</item>
<item>150</item>
<item>160</item>
<item>220</item>
<item>270</item>
<item>360</item>
<item>420</item>
<item>510</item>
<item>620</item>
<item>1000</item>
<item>2000</item>
<item>3300</item>
<item>6000</item>
<item>10000</item>
<item>3100</item>
<item>5000</item>
<item>8000</item>
<item>12000</item>
<item>16000</item>
<item>20000</item>
</integer-array>
<!-- Array of desired screen brightness in nits corresponding to the lux values
@ -74,23 +129,31 @@
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.5077</item>
<item>6.8394</item>
<item>15.2619</item>
<item>30.2619</item>
<item>40.671</item>
<item>52.3019</item>
<item>65.2512</item>
<item>77.37</item>
<item>90.152</item>
<item>100.297</item>
<item>110.385</item>
<item>135.064</item>
<item>160.5179</item>
<item>195.0267</item>
<item>380.2814</item>
<item>409.2867</item>
<item>427.6287</item>
<item>2.0487</item>
<item>4.8394</item>
<item>17.2619</item>
<item>39.2619</item>
<item>50.671</item>
<item>72.95</item>
<item>80.46</item>
<item>84.38</item>
<item>89.51</item>
<item>100.34</item>
<item>102.21</item>
<item>109.48</item>
<item>114.19</item>
<item>123.86</item>
<item>129.18</item>
<item>138.07</item>
<item>145.62</item>
<item>168.84</item>
<item>234.9</item>
<item>280</item>
<item>320</item>
<item>360</item>
<item>405</item>
<item>450</item>
<item>500</item>
</array>
<!-- An array of floats describing the screen brightness in nits corresponding to the backlight
@ -101,74 +164,71 @@
This array should be equal in size to config_screenBrightnessBacklight -->
<array name="config_screenBrightnessNits">
<item>2.0482</item>
<item>2.7841</item>
<item>3.79505</item>
<item>4.4748</item>
<item>5.08</item>
<item>6.4233</item>
<item>8.0848</item>
<item>11.6607</item>
<item>13.2347</item>
<item>15.0676</item>
<item>16.8302</item>
<item>18.4261</item>
<item>20.3103</item>
<item>21.9042</item>
<item>23.5456</item>
<item>25.2137</item>
<item>27.1769</item>
<item>28.9571</item>
<item>30.5244</item>
<item>32.3535</item>
<item>34.0867</item>
<item>42.366</item>
<item>51.1309</item>
<item>59.52</item>
<item>67.744</item>
<item>75.9738</item>
<item>84.6332</item>
<item>94.1525</item>
<item>102.2207</item>
<item>110.4878</item>
<item>117.0405</item>
<item>124.3733</item>
<item>130.9928</item>
<item>140.4247</item>
<item>149.3156</item>
<item>157.1995</item>
<item>165.3651</item>
<item>173.2726</item>
<item>181.4272</item>
<item>189.1402</item>
<item>197.5334</item>
<item>205.6301</item>
<item>213.9381</item>
<item>222.2769</item>
<item>230.0891</item>
<item>238.6084</item>
<item>246.5399</item>
<item>255.6544</item>
<item>263.6221</item>
<item>271.9324</item>
<item>279.1449</item>
<item>288.5736</item>
<item>297.6628</item>
<item>306.1899</item>
<item>314.4511</item>
<item>322.1404</item>
<item>330.969</item>
<item>338.2251</item>
<item>346.2251</item>
<item>354.567</item>
<item>370.799</item>
<item>413.1738</item>
<item>415.6397</item>
<item>417.264</item>
<item>419.264</item>
<item>421.264</item>
<item>424.646</item>
<item>427.6287</item>
<item>0</item>
<item>3.04</item>
<item>3.29</item>
<item>3.53</item>
<item>3.74</item>
<item>4.71</item>
<item>5.81</item>
<item>7.26</item>
<item>8.6</item>
<item>10.3</item>
<item>12.03</item>
<item>13.89</item>
<item>16.12</item>
<item>18.28</item>
<item>20.95</item>
<item>23.93</item>
<item>26.66</item>
<item>30.23</item>
<item>33.33</item>
<item>37.15</item>
<item>40.79</item>
<item>44.2</item>
<item>48.41</item>
<item>52.78</item>
<item>57.45</item>
<item>62.38</item>
<item>67.94</item>
<item>73.47</item>
<item>79.28</item>
<item>85.41</item>
<item>91.85</item>
<item>98.44</item>
<item>105.33</item>
<item>112.54</item>
<item>119.99</item>
<item>127.51</item>
<item>135.3</item>
<item>143.53</item>
<item>151.78</item>
<item>160.59</item>
<item>169.36</item>
<item>178.43</item>
<item>188.01</item>
<item>197.69</item>
<item>207.53</item>
<item>218.91</item>
<item>230.28</item>
<item>242.07</item>
<item>253.43</item>
<item>264.83</item>
<item>279.3</item>
<item>291.74</item>
<item>304.09</item>
<item>317.42</item>
<item>330.38</item>
<item>344.16</item>
<item>360.38</item>
<item>374.71</item>
<item>389.93</item>
<item>406.35</item>
<item>421.99</item>
<item>436.78</item>
<item>454.79</item>
<item>470.5</item>
<item>488.38</item>
</array>
<!-- An array describing the screen's backlight values corresponding to the brightness
@ -177,186 +237,98 @@
This array should be equal in size to config_screenBrightnessBacklight. -->
<integer-array name="config_screenBrightnessBacklight">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>25</item>
<item>30</item>
<item>35</item>
<item>24</item>
<item>28</item>
<item>32</item>
<item>36</item>
<item>40</item>
<item>45</item>
<item>50</item>
<item>55</item>
<item>44</item>
<item>48</item>
<item>52</item>
<item>56</item>
<item>60</item>
<item>65</item>
<item>70</item>
<item>75</item>
<item>64</item>
<item>68</item>
<item>72</item>
<item>76</item>
<item>80</item>
<item>85</item>
<item>90</item>
<item>95</item>
<item>84</item>
<item>88</item>
<item>92</item>
<item>96</item>
<item>100</item>
<item>105</item>
<item>110</item>
<item>115</item>
<item>104</item>
<item>108</item>
<item>112</item>
<item>116</item>
<item>120</item>
<item>125</item>
<item>130</item>
<item>123</item>
<item>127</item>
<item>131</item>
<item>135</item>
<item>140</item>
<item>145</item>
<item>150</item>
<item>139</item>
<item>143</item>
<item>147</item>
<item>151</item>
<item>155</item>
<item>160</item>
<item>165</item>
<item>170</item>
<item>174</item>
<item>159</item>
<item>163</item>
<item>167</item>
<item>171</item>
<item>175</item>
<item>179</item>
<item>184</item>
<item>189</item>
<item>194</item>
<item>183</item>
<item>187</item>
<item>191</item>
<item>195</item>
<item>199</item>
<item>204</item>
<item>209</item>
<item>214</item>
<item>203</item>
<item>207</item>
<item>211</item>
<item>215</item>
<item>219</item>
<item>224</item>
<item>229</item>
<item>234</item>
<item>223</item>
<item>227</item>
<item>231</item>
<item>235</item>
<item>239</item>
<item>244</item>
<item>249</item>
<item>243</item>
<item>246</item>
<item>251</item>
<item>255</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>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>250</item>
<item>300</item>
<item>300</item>
<item>300</item>
<item>300</item>
<item>300</item>
<item>300</item>
<item>400</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>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>300</item>
<item>400</item>
<item>400</item>
<item>400</item>
<item>400</item>
<item>400</item>
<item>400</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>1</item>
<item>4</item>
<item>12</item>
<item>20</item>
<item>40</item>
<item>65</item>
<item>95</item>
<item>140</item>
<item>200</item>
<item>350</item>
<item>650</item>
<item>1300</item>
<item>2000</item>
<item>3300</item>
<item>6000</item>
<item>10000</item>
</integer-array>
<!-- Screen brightness used to dim the screen when the user activity
timeout expires. May be less than the minimum allowed brightness setting
that can be set by the user. -->
<integer name="config_screenBrightnessDim">6</integer>
<!-- Default screen brightness setting.
<!-- 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. -->
<integer name="config_screenBrightnessSettingDefault">184</integer>
<item type="dimen" name="config_screenBrightnessSettingDefaultFloat">0.44313726</item>
<!-- Minimum screen brightness setting allowed by the power manager.
<!-- 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. -->
<integer name="config_screenBrightnessSettingMinimum">2</integer>
<item type="dimen" name="config_screenBrightnessSettingMinimumFloat">0.007843137</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">2000</integer>
<integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer>
<integer name="config_autoBrightnessBrighteningLightDebounce">1500</integer>
<integer name="config_autoBrightnessDarkeningLightDebounce">1500</integer>
<!-- The maximum range of gamma adjustment possible using the screen
auto-brightness adjustment setting. -->
<fraction name="config_autoBrightnessAdjustmentMaxGamma">300%</fraction>
<!-- Amount of time it takes for the light sensor to warm up in milliseconds.
For this time after the screen turns on, the Power Manager
will not debounce light sensor readings -->
<integer name="config_lightSensorWarmupTime">200</integer>
<!-- Light sensor event rate in milliseconds for automatic brightness control. -->
<integer name="config_autoBrightnessLightSensorRate">200</integer>
<!-- Boolean indicating whether display white balance is supported. -->
<bool name="config_displayWhiteBalanceAvailable">true</bool>