Add labels to intensity slider and flip labels
Labels are Dimmer and Brighter. As the slider value is lowered, the dimming intensity is increased Slider min = 100 - intensity max Slider max = 100 - intensity min Ex: If intensity max = 80, the slider min with be 20. If the user moves the position to the minimum end we'll send 80 to Color DisplayManager Test: atest ReduceBrightColorsIntensityPreferenceControllerTest, manual Bug: 190722076 Change-Id: Ib05ba38805b8fa1f68c144a3929027899df70abf
This commit is contained in:
@@ -84,7 +84,7 @@ public class ReduceBrightColorsIntensityPreferenceControllerTest {
|
||||
assertThat(
|
||||
Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.REDUCE_BRIGHT_COLORS_LEVEL, 0))
|
||||
.isEqualTo(20);
|
||||
.isEqualTo(80);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -92,8 +92,10 @@ public class ReduceBrightColorsIntensityPreferenceControllerTest {
|
||||
when(mResources.getInteger(
|
||||
R.integer.config_reduceBrightColorsStrengthMax)).thenReturn(90);
|
||||
when(mResources.getInteger(
|
||||
R.integer.config_reduceBrightColorsStrengthMin)).thenReturn(10);
|
||||
R.integer.config_reduceBrightColorsStrengthMin)).thenReturn(15);
|
||||
assertThat(mPreferenceController.getMax()).isEqualTo(85);
|
||||
assertThat(mPreferenceController.getMin()).isEqualTo(10);
|
||||
assertThat(mPreferenceController.getMax() - mPreferenceController.getMin())
|
||||
.isEqualTo(80);
|
||||
.isEqualTo(75);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user