Loading tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading Loading @@ -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(); Loading Loading
tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSliceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading Loading @@ -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(); Loading