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

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

Change-Id: I9d14f7b1c2fba164a16a291a1a2b607cf5c47735
This commit is contained in:
Yi Jiang
2021-04-29 17:47:46 +00:00
committed by Automerger Merge Worker
5 changed files with 55 additions and 36 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);