From 260c524f473568b495a39b0a2955a2df6bed7759 Mon Sep 17 00:00:00 2001 From: Long Ling Date: Thu, 8 Aug 2019 16:05:19 -0700 Subject: DeviceConfig: Add Name space and keys for Display Manager Bug: 139138964 Change-Id: I077380583f0daf650b17832a6cec4919b41ac155 --- api/system-current.txt | 1 + .../android/hardware/display/DisplayManager.java | 36 ++++++++++++++++++++++ core/java/android/provider/DeviceConfig.java | 9 ++++++ 3 files changed, 46 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 76d017c44822..d037ce796d08 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5843,6 +5843,7 @@ package android.provider { field public static final String NAMESPACE_CONNECTIVITY = "connectivity"; field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture"; field public static final String NAMESPACE_DEX_BOOT = "dex_boot"; + field public static final String NAMESPACE_DISPLAY_MANAGER = "display_manager"; field public static final String NAMESPACE_GAME_DRIVER = "game_driver"; field public static final String NAMESPACE_INPUT_NATIVE_BOOT = "input_native_boot"; field public static final String NAMESPACE_INTELLIGENCE_ATTENTION = "intelligence_attention"; diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index 8a0a9c7c9d9d..21c49add6cba 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -820,4 +820,40 @@ public final class DisplayManager { */ void onDisplayChanged(int displayId); } + + /** + * Interface for accessing keys belonging to {@link + * android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER}. + * @hide + */ + public interface DeviceConfig { + + /** + * Key for accessing the 60 hz only regions. + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.array#config_brightnessThresholdsOfPeakRefreshRate + * @hide + */ + String KEY_PEAK_REFRESH_RATE_BRIGHTNESS_THRESHOLDS = + "peak_refresh_rate_brightness_thresholds"; + + /** + * Key for accessing the 60 hz only regions. + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.array#config_brightnessThresholdsOfPeakRefreshRate + * @hide + */ + String KEY_PEAK_REFRESH_RATE_AMBIENT_THRESHOLDS = "peak_refresh_rate_ambient_thresholds"; + + /** + * Key for default peak refresh rate + * + * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER + * @see android.R.integer#config_defaultPeakRefreshRate + * @hide + */ + String KEY_PEAK_REFRESH_RATE_DEFAULT = "peak_refresh_rate_default"; + } } diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java index 4f7c8c5d87e2..88865613fed8 100644 --- a/core/java/android/provider/DeviceConfig.java +++ b/core/java/android/provider/DeviceConfig.java @@ -135,6 +135,15 @@ public final class DeviceConfig { @SystemApi public static final String NAMESPACE_DEX_BOOT = "dex_boot"; + /** + * Namespace for display manager related features. The names to access the properties in this + * namespace should be defined in {@link android.hardware.display.DisplayManager}. + * + * @hide + */ + @SystemApi + public static final String NAMESPACE_DISPLAY_MANAGER = "display_manager"; + /** * Namespace for all Game Driver features. * -- cgit v1.2.3-59-g8ed1b