Merge "Fixes incorrect Settings usages in ContextualAdaptiveSleepSliceTest" into rvc-dev am: b33c16cacb
am: bf82eab918
Change-Id: Ifecd2010f27b8ba5863a25adfae513b5b347b5c2
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user