Loading services/core/java/com/android/server/pm/UserManagerService.java +12 −7 Original line number Diff line number Diff line Loading @@ -1934,6 +1934,8 @@ public class UserManagerService extends IUserManager.Stub { if (user == null) { return null; } long identity = Binder.clearCallingIdentity(); try { setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true, user.id); // Change the setting before applying the DISALLOW_SHARE_LOCATION restriction, otherwise // the putIntForUser() will fail. Loading @@ -1941,6 +1943,9 @@ public class UserManagerService extends IUserManager.Stub { android.provider.Settings.Secure.LOCATION_MODE, android.provider.Settings.Secure.LOCATION_MODE_OFF, user.id); setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, user.id); } finally { Binder.restoreCallingIdentity(identity); } return user; } Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +12 −7 Original line number Diff line number Diff line Loading @@ -1934,6 +1934,8 @@ public class UserManagerService extends IUserManager.Stub { if (user == null) { return null; } long identity = Binder.clearCallingIdentity(); try { setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true, user.id); // Change the setting before applying the DISALLOW_SHARE_LOCATION restriction, otherwise // the putIntForUser() will fail. Loading @@ -1941,6 +1943,9 @@ public class UserManagerService extends IUserManager.Stub { android.provider.Settings.Secure.LOCATION_MODE, android.provider.Settings.Secure.LOCATION_MODE_OFF, user.id); setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, user.id); } finally { Binder.restoreCallingIdentity(identity); } return user; } Loading