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

Commit b33c16ca authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes incorrect Settings usages in ContextualAdaptiveSleepSliceTest" into rvc-dev

parents dc1f295a 80d0fa1c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ public class ContextualAdaptiveSleepSliceTest {
        mContext = spy(RuntimeEnvironment.application);
        mContextualAdaptiveSleepSlice = spy(new ContextualAdaptiveSleepSlice(mContext));

        Settings.System.putInt(mContext.getContentResolver(), Settings.System.ADAPTIVE_SLEEP, 0);
        Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.ADAPTIVE_SLEEP, 0);
        doReturn(mPackageManager).when(mContext).getPackageManager();
        doReturn(mSharedPreferences).when(mContext).getSharedPreferences(eq(PREF), anyInt());
        doReturn(true).when(mContextualAdaptiveSleepSlice).isSettingsAvailable();
@@ -124,7 +124,7 @@ public class ContextualAdaptiveSleepSliceTest {

    @Test
    public void getSlice_DoNotShowIFTurnedOn() {
        Settings.System.putInt(mContext.getContentResolver(), Settings.System.ADAPTIVE_SLEEP, 1);
        Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.ADAPTIVE_SLEEP, 1);

        final Slice slice = mContextualAdaptiveSleepSlice.getSlice();