diff options
| author | Michael Wright <michaelwr@google.com> | 2021-01-15 02:47:05 +0800 |
|---|---|---|
| committer | Raylin Hsu <raylinhsu@google.com> | 2021-01-19 01:07:01 +0000 |
| commit | 58515946ac0f3700c10353a2b4d9e87f0048efd5 (patch) | |
| tree | 073edbb4c802de19e3729a0180bf771ed902d85e /core/java/android | |
| parent | 0ecd3e13e7aa3dfbcd96564b9c3444152e3a1532 (diff) | |
DO NOT MERGE "Allow DeviceConfig to change display settings for high zone"
Allow DeviceConfig to change the high zone behavior including
refresh rate and brightness thresholds.
Bug: 177636374
Test: atest DisplayModeDirectorTest
Test: adb shell device_config put display_manager refresh_rate_in_high_zone "90"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_display_brightness_thresholds "200"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_ambient_brightness_thresholds "8000"
Change-Id: I1463d6c5daaee46a87a193e98e7f63cad9274b49
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/hardware/display/DisplayManager.java | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index c1ba2094d3cf..0fa4ca8a574b 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -875,38 +875,77 @@ public final class DisplayManager { public interface DeviceConfig { /** - * Key for refresh rate in the zone defined by thresholds. + * Key for refresh rate in the low zone defined by thresholds. * + * Note that the name and value don't match because they were added before we had a high + * zone to consider. * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.integer#config_defaultZoneBehavior */ - String KEY_REFRESH_RATE_IN_ZONE = "refresh_rate_in_zone"; + String KEY_REFRESH_RATE_IN_LOW_ZONE = "refresh_rate_in_zone"; /** - * Key for accessing the display brightness thresholds for the configured refresh rate zone. + * Key for accessing the low display brightness thresholds for the configured refresh + * rate zone. * The value will be a pair of comma separated integers representing the minimum and maximum * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). * + * Note that the name and value don't match because they were added before we had a high + * zone to consider. + * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_brightnessThresholdsOfPeakRefreshRate * @hide */ - String KEY_PEAK_REFRESH_RATE_DISPLAY_BRIGHTNESS_THRESHOLDS = + String KEY_FIXED_REFRESH_RATE_LOW_DISPLAY_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_brightness_thresholds"; /** - * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. - * The value will be a pair of comma separated integers representing the minimum and maximum - * thresholds of the zone, respectively, in lux. + * Key for accessing the low ambient brightness thresholds for the configured refresh + * rate zone. The value will be a pair of comma separated integers representing the minimum + * and maximum thresholds of the zone, respectively, in lux. + * + * Note that the name and value don't match because they were added before we had a high + * zone to consider. * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER * @see android.R.array#config_ambientThresholdsOfPeakRefreshRate * @hide */ - String KEY_PEAK_REFRESH_RATE_AMBIENT_BRIGHTNESS_THRESHOLDS = + String KEY_FIXED_REFRESH_RATE_LOW_AMBIENT_BRIGHTNESS_THRESHOLDS = "peak_refresh_rate_ambient_thresholds"; + /** + * Key for refresh rate in the high zone defined by thresholds. + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.integer#config_fixedRefreshRateInHighZone + */ + String KEY_REFRESH_RATE_IN_HIGH_ZONE = "refresh_rate_in_high_zone"; /** + * Key for accessing the display brightness thresholds for the configured refresh rate zone. + * The value will be a pair of comma separated integers representing the minimum and maximum + * thresholds of the zone, respectively, in display backlight units (i.e. [0, 255]). + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.array#config_brightnessHighThresholdsOfFixedRefreshRate + * @hide + */ + String KEY_FIXED_REFRESH_RATE_HIGH_DISPLAY_BRIGHTNESS_THRESHOLDS = + "fixed_refresh_rate_high_display_brightness_thresholds"; + + /** + * Key for accessing the ambient brightness thresholds for the configured refresh rate zone. + * The value will be a pair of comma separated integers representing the minimum and maximum + * thresholds of the zone, respectively, in lux. + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.array#config_ambientHighThresholdsOfFixedRefreshRate + * @hide + */ + String KEY_FIXED_REFRESH_RATE_HIGH_AMBIENT_BRIGHTNESS_THRESHOLDS = + "fixed_refresh_rate_high_ambient_brightness_thresholds"; + /** * Key for default peak refresh rate * * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER |
