diff options
| author | sallyyuen <sallyyuen@google.com> | 2021-02-24 10:14:13 -0800 |
|---|---|---|
| committer | sallyyuen <sallyyuen@google.com> | 2021-02-24 13:58:49 -0800 |
| commit | 57733d9be8d492e369dd9f9ab247402725d65a3d (patch) | |
| tree | 2ebd6345aea2603ad302704889890cb7f19477d5 /core/java/android | |
| parent | 1f21265785954fb3e9a5e9de204999bb80602c27 (diff) | |
Add configurable strength values for Reduce Bright Colors
Test: atest FrameworkServicesTests:ReduceBrightColorsTintControllerTest,
atest FrameworksServicesTests:ColorDisplayServiceTest
Bug: b/179805222
Change-Id: I70bfedd9d2226abac2a2cb6952ffb835ea8891d5
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/hardware/display/ColorDisplayManager.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/hardware/display/ColorDisplayManager.java b/core/java/android/hardware/display/ColorDisplayManager.java index e247df320115..aafa7d520632 100644 --- a/core/java/android/hardware/display/ColorDisplayManager.java +++ b/core/java/android/hardware/display/ColorDisplayManager.java @@ -537,6 +537,26 @@ public final class ColorDisplayManager { } /** + * Returns the minimum allowed brightness reduction strength in percentage when activated. + * + * @hide + */ + public static int getMinimumReduceBrightColorsStrength(Context context) { + return context.getResources() + .getInteger(R.integer.config_reduceBrightColorsStrengthMin); + } + + /** + * Returns the maximum allowed brightness reduction strength in percentage when activated. + * + * @hide + */ + public static int getMaximumReduceBrightColorsStrength(Context context) { + return context.getResources() + .getInteger(R.integer.config_reduceBrightColorsStrengthMax); + } + + /** * Check if the color transforms are color accelerated. Some transforms are experimental only * on non-accelerated platforms due to the performance implications. * |
