Add configurable strength values for Reduce Bright Colors

Test: atest FrameworkServicesTests:ReduceBrightColorsTintControllerTest,
atest FrameworksServicesTests:ColorDisplayServiceTest

 Bug: b/179805222

Change-Id: I70bfedd9d2226abac2a2cb6952ffb835ea8891d5
This commit is contained in:
sallyyuen
2021-02-24 10:14:13 -08:00
parent 1f21265785
commit 57733d9be8
3 changed files with 32 additions and 0 deletions

View File

@@ -536,6 +536,26 @@ public final class ColorDisplayManager {
return context.getResources().getBoolean(R.bool.config_reduceBrightColorsAvailable);
}
/**
* 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.