mirror of
https://github.com/pjgowtham/android_device_realme_ferrarri.git
synced 2026-11-29 01:04:39 +00:00
ferrari: Move brightness thresholds and debounce to displayconfig
The display device config overrides these overlays, and the framework reads the doze brightness only as a fallback for it. Values unchanged; the config thresholds are in percent rather than permille. Assisted-by: LLM Change-Id: I86a5632ce1c5b3af0ab1d4c61c3a58d880a25409
This commit is contained in:
1 parent
ba03f295ac
commit
e427470034
2 files changed
+49
-70
No files matched your search
@@ -82,10 +82,59 @@
|
||||
</point>
|
||||
</sdrHdrRatioMap>
|
||||
</highBrightnessMode>
|
||||
<autoBrightness enabled="true">
|
||||
<brighteningLightDebounceMillis>1500</brighteningLightDebounceMillis>
|
||||
<darkeningLightDebounceMillis>1500</darkeningLightDebounceMillis>
|
||||
</autoBrightness>
|
||||
<screenBrightnessRampFastDecrease>0.06</screenBrightnessRampFastDecrease>
|
||||
<screenBrightnessRampFastIncrease>0.06</screenBrightnessRampFastIncrease>
|
||||
<screenBrightnessRampSlowDecrease>0.04</screenBrightnessRampSlowDecrease>
|
||||
<screenBrightnessRampSlowIncrease>0.04</screenBrightnessRampSlowIncrease>
|
||||
<screenBrightnessRampIncreaseMaxMillis>3000</screenBrightnessRampIncreaseMaxMillis>
|
||||
<screenBrightnessRampDecreaseMaxMillis>3000</screenBrightnessRampDecreaseMaxMillis>
|
||||
<displayBrightnessChangeThresholds>
|
||||
<brighteningThresholds>
|
||||
<brightnessThresholdPoints>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>0</threshold>
|
||||
<percentage>0</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
</brightnessThresholdPoints>
|
||||
</brighteningThresholds>
|
||||
<darkeningThresholds>
|
||||
<brightnessThresholdPoints>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>0</threshold>
|
||||
<percentage>0</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
</brightnessThresholdPoints>
|
||||
</darkeningThresholds>
|
||||
</displayBrightnessChangeThresholds>
|
||||
<ambientBrightnessChangeThresholds>
|
||||
<brighteningThresholds>
|
||||
<brightnessThresholdPoints>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>0</threshold>
|
||||
<percentage>60</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>10</threshold>
|
||||
<percentage>30</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
</brightnessThresholdPoints>
|
||||
</brighteningThresholds>
|
||||
<darkeningThresholds>
|
||||
<brightnessThresholdPoints>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>0</threshold>
|
||||
<percentage>60</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
<brightnessThresholdPoint>
|
||||
<threshold>10</threshold>
|
||||
<percentage>30</percentage>
|
||||
</brightnessThresholdPoint>
|
||||
</brightnessThresholdPoints>
|
||||
</darkeningThresholds>
|
||||
</ambientBrightnessChangeThresholds>
|
||||
<defaultDozeBrightness>0.00097680097</defaultDozeBrightness>
|
||||
</displayConfiguration>
|
||||
@@ -9,63 +9,6 @@
|
||||
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>10</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_screenThresholdLevels. The brightening threshold is calculated as
|
||||
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>
|
||||
|
||||
<!-- 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)
|
||||
@@ -225,11 +168,6 @@
|
||||
that can be set by the user. -->
|
||||
<item type="dimen" name="config_screenBrightnessDimFloat">0.00097680097</item>
|
||||
|
||||
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
|
||||
May be less than the minimum allowed brightness setting
|
||||
that can be set by the user. -->
|
||||
<item type="dimen" name="config_screenBrightnessDozeFloat">0.00097680097</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. -->
|
||||
@@ -251,14 +189,6 @@
|
||||
auto-brightness adjustment setting. -->
|
||||
<fraction name="config_autoBrightnessAdjustmentMaxGamma">100%</fraction>
|
||||
|
||||
<!-- 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">1500</integer>
|
||||
<integer name="config_autoBrightnessDarkeningLightDebounce">1500</integer>
|
||||
|
||||
<!-- Minimum color temperature, in Kelvin, supported by display white balance. -->
|
||||
<integer name="config_displayWhiteBalanceColorTemperatureMin">5000</integer>
|
||||
|
||||
|
||||
Reference in new issue
Block a user