diff --git a/src/com/android/settings/location/LocationEnabler.java b/src/com/android/settings/location/LocationEnabler.java index 30ecf2e5a00..fd557a313ec 100644 --- a/src/com/android/settings/location/LocationEnabler.java +++ b/src/com/android/settings/location/LocationEnabler.java @@ -169,7 +169,7 @@ public class LocationEnabler implements LifecycleObserver, OnResume, OnPause { if (admin == null) { admin = RestrictedLockUtils.checkIfRestrictionEnforced( - mContext, UserManager.DISALLOW_CONFIG_LOCATION_MODE, userId); + mContext, UserManager.DISALLOW_CONFIG_LOCATION, userId); } return admin; } diff --git a/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java b/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java index 1bae729063b..ca42b3a188e 100644 --- a/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java +++ b/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java @@ -252,7 +252,7 @@ public class LocationEnablerTest { enforcingUsers.add(new UserManager.EnforcingUser(userId, UserManager.RESTRICTION_SOURCE_PROFILE_OWNER)); when(mUserManager.getUserRestrictionSources( - UserManager.DISALLOW_CONFIG_LOCATION_MODE, UserHandle.of(userId))) + UserManager.DISALLOW_CONFIG_LOCATION, UserHandle.of(userId))) .thenReturn(enforcingUsers); assertThat(mEnabler.getShareLocationEnforcedAdmin(userId) != null).isTrue();