Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b75902f0 authored by sallyyuen's avatar sallyyuen Committed by Sally Yuen
Browse files

Reduce RBC test flakiness

Read the setting directly, which is successfully being set by the
display manager

Bug: 182099323
Test: forrest
Change-Id: Ia68c8206187995fc5a615d6815f04b8ad01f9312
parent e12ad977
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import static org.mockito.Mockito.when;

import android.content.Context;
import android.content.res.Resources;
import android.hardware.display.ColorDisplayManager;
import android.provider.Settings;

import androidx.test.core.app.ApplicationProvider;
@@ -83,8 +82,8 @@ public class ReduceBrightColorsIntensityPreferenceControllerTest {
                Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, 1);
        mPreferenceController.onPreferenceChange(/* preference= */ null, 20);
        assertThat(
                mContext.getSystemService(
                        ColorDisplayManager.class).getReduceBrightColorsStrength())
                Settings.Secure.getInt(mContext.getContentResolver(),
                        Settings.Secure.REDUCE_BRIGHT_COLORS_LEVEL, 0))
                .isEqualTo(20);
    }