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

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

Change-Id: Icbe84137bd1c64fa2c905416c775dd71cccb2bf2
This commit is contained in:
Yi Jiang
2021-05-04 20:02:04 +00:00
committed by Automerger Merge Worker
5 changed files with 61 additions and 38 deletions

View File

@@ -84,6 +84,7 @@ 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,8 +60,6 @@ public class ScreenTimeoutSettingsTest {
private ScreenTimeoutSettings mSettings;
private Context mContext;
private ContentResolver mContentResolver;
@Mock
private Resources mResources;
@Mock
@@ -85,7 +83,9 @@ 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);