diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java index d6df033212983..94bff893b5a85 100644 --- a/core/java/android/hardware/display/DisplayManagerInternal.java +++ b/core/java/android/hardware/display/DisplayManagerInternal.java @@ -412,6 +412,15 @@ public abstract class DisplayManagerInternal { @Nullable public abstract HostUsiVersion getHostUsiVersion(int displayId); + /** + * Get the ALS data for a particular display. + * + * @param displayId The id of the display. + * @return {@link AmbientLightSensorData} + */ + @Nullable + public abstract AmbientLightSensorData getAmbientLightSensorData(int displayId); + /** * Get all available DisplayGroupIds. */ @@ -669,4 +678,23 @@ public abstract class DisplayManagerInternal { return "RefreshRateLimitation(" + type + ": " + range + ")"; } } + + /** + * Class to provide Ambient sensor data using the API + * {@link DisplayManagerInternal#getAmbientLightSensorData(int)} + */ + public static final class AmbientLightSensorData { + public String sensorName; + public String sensorType; + + public AmbientLightSensorData(String name, String type) { + sensorName = name; + sensorType = type; + } + + @Override + public String toString() { + return "AmbientLightSensorData(" + sensorName + ", " + sensorType + ")"; + } + } } diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 8473f9bc8d0b7..828e7aa765660 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1675,16 +1675,56 @@ 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 --> - - + + 1.0 + + + + + 102 + 153 + 0 + + + + + -1 + 40 + 150 + + + + + 55 + 200 + -1