diff --git a/tests/robotests/src/com/android/settings/display/AutoRotatePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/AutoRotatePreferenceControllerTest.java index 2bcf060eb0d..fd91867121f 100644 --- a/tests/robotests/src/com/android/settings/display/AutoRotatePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/display/AutoRotatePreferenceControllerTest.java @@ -190,15 +190,17 @@ public class AutoRotatePreferenceControllerTest { private void enableAutoRotationPreference() { when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true); when(mContext.getResources().getBoolean(anyInt())).thenReturn(true); - Settings.System.putInt(mContentResolver, - Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0); + Settings.System.putIntForUser(mContentResolver, + Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0, + UserHandle.USER_CURRENT); } private void disableAutoRotationPreference() { when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true); when(mContext.getResources().getBoolean(anyInt())).thenReturn(true); - Settings.System.putInt(mContentResolver, - Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 1); + Settings.System.putIntForUser(mContentResolver, + Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 1, + UserHandle.USER_CURRENT); } private void enableAutoRotation() { diff --git a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java index d9187eb9b4c..9f1b5d4357f 100644 --- a/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/display/SmartAutoRotatePreferenceControllerTest.java @@ -236,15 +236,17 @@ public class SmartAutoRotatePreferenceControllerTest { private void enableAutoRotationPreference() { when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true); when(mResources.getBoolean(anyInt())).thenReturn(true); - Settings.System.putInt(mContentResolver, - Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0); + Settings.System.putIntForUser(mContentResolver, + Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0, + UserHandle.USER_CURRENT); } private void disableAutoRotationPreference() { when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true); when(mResources.getBoolean(anyInt())).thenReturn(true); - Settings.System.putInt(mContentResolver, - Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 1); + Settings.System.putIntForUser(mContentResolver, + Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 1, + UserHandle.USER_CURRENT); } private void enableAutoRotation() {