Merge "Revert "Fixes 'no ripple effect' issue for screen attention setting"" into sc-dev am: deb2acc9b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14410366

Change-Id: Iea4057f38107df13c2d5b62719bd1845b7f14540
This commit is contained in:
bsears
2021-05-03 22:22:52 +00:00
committed by Automerger Merge Worker
5 changed files with 36 additions and 55 deletions

View File

@@ -84,7 +84,6 @@ public class AdaptiveSleepPreferenceControllerTest {
eq(UserManager.DISALLOW_CONFIG_SCREEN_TIMEOUT))).thenReturn(null);
mController = new AdaptiveSleepPreferenceController(mContext, mRestrictionUtils);
mController.initializePreference();
when(mController.isCameraLocked()).thenReturn(false);
}

View File

@@ -60,6 +60,8 @@ public class ScreenTimeoutSettingsTest {
private ScreenTimeoutSettings mSettings;
private Context mContext;
private ContentResolver mContentResolver;
@Mock
private Resources mResources;
@Mock
@@ -83,9 +85,7 @@ public class ScreenTimeoutSettingsTest {
FakeFeatureFactory.setupForTest();
mContext = spy(getApplicationContext());
mSettings = spy(new ScreenTimeoutSettings());
mSettings.mContext = mContext;
mContentResolver = mContext.getContentResolver();
mResources = spy(mContext.getResources());
doReturn(TIMEOUT_ENTRIES).when(mResources).getStringArray(R.array.screen_timeout_entries);
doReturn(TIMEOUT_VALUES).when(mResources).getStringArray(R.array.screen_timeout_entries);