use of android.hardware.display.BrightnessConfiguration in project robolectric by robolectric.
the class ShadowDisplayManagerTest method getBrightnessConfiguration_setToNull_shouldReturnDefault.
@Test
@Config(minSdk = P)
public void getBrightnessConfiguration_setToNull_shouldReturnDefault() {
BrightnessConfiguration config = new BrightnessConfiguration.Builder(/* lux= */
new float[] { 0.0f, 5000.0f }, /* nits= */
new float[] { 2.0f, 400.0f }).build();
ShadowDisplayManager.setDefaultBrightnessConfiguration(config);
instance.setBrightnessConfiguration(null);
assertThat(instance.getBrightnessConfiguration()).isEqualTo(config);
}
Aggregations