Loading services/core/java/com/android/server/pm/UserManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -2139,6 +2139,7 @@ public class UserManagerService extends IUserManager.Stub { * exist in device policy local restrictions, remove the restrictions bundle for that target * user originating from the specified originating user. */ @GuardedBy("mRestrictionsLock") private boolean updateLocalRestrictionsForTargetUsersLR(int originatingUserId, RestrictionsSet local, List<Integer> updatedTargetUserIds) { boolean changed = false; Loading @@ -2161,6 +2162,7 @@ public class UserManagerService extends IUserManager.Stub { * * @return restrictions set for a given target user. */ @GuardedBy("mRestrictionsLock") private @NonNull RestrictionsSet getDevicePolicyLocalRestrictionsForTargetUserLR( int targetUserId) { RestrictionsSet result = mDevicePolicyLocalUserRestrictions.get(targetUserId); Loading Loading @@ -2411,6 +2413,7 @@ public class UserManagerService extends IUserManager.Stub { mAppliedUserRestrictions.updateRestrictions(userId, new Bundle(effective)); } @GuardedBy("mRestrictionsLock") private void propagateUserRestrictionsLR(final int userId, Bundle newRestrictions, Bundle prevRestrictions) { // Note this method doesn't touch any state, meaning it doesn't require mRestrictionsLock Loading Loading @@ -2884,6 +2887,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeBitmapLP(UserInfo info, Bitmap bitmap) { try { File dir = new File(mUsersDir, Integer.toString(info.id)); Loading Loading @@ -3453,6 +3457,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeAllTargetUsersLP(int originatingUserId) { for (int i = 0; i < mDevicePolicyLocalUserRestrictions.size(); i++) { int targetUserId = mDevicePolicyLocalUserRestrictions.keyAt(i); Loading @@ -3463,6 +3468,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeUserLP(UserData userData) { if (DBG) { debug("writeUserLP " + userData); Loading @@ -3486,6 +3492,7 @@ public class UserManagerService extends IUserManager.Stub { * <name>Primary</name> * </user> */ @GuardedBy({"mPackagesLock"}) @VisibleForTesting void writeUserLP(UserData userData, OutputStream os) throws IOException, XmlPullParserException { Loading Loading @@ -3638,6 +3645,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private UserData readUserLP(int id) { FileInputStream fis = null; try { Loading @@ -3655,6 +3663,7 @@ public class UserManagerService extends IUserManager.Stub { return null; } @GuardedBy({"mPackagesLock"}) @VisibleForTesting UserData readUserLP(int id, InputStream is) throws IOException, XmlPullParserException { Loading Loading @@ -3827,6 +3836,7 @@ public class UserManagerService extends IUserManager.Stub { * * @return whether there were any restrictions. */ @GuardedBy({"mAppRestrictionsLock"}) private static boolean cleanAppRestrictionsForPackageLAr(String pkg, @UserIdInt int userId) { final File dir = Environment.getUserSystemDirectory(userId); final File resFile = new File(dir, packageToRestrictionsFileName(pkg)); Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -2139,6 +2139,7 @@ public class UserManagerService extends IUserManager.Stub { * exist in device policy local restrictions, remove the restrictions bundle for that target * user originating from the specified originating user. */ @GuardedBy("mRestrictionsLock") private boolean updateLocalRestrictionsForTargetUsersLR(int originatingUserId, RestrictionsSet local, List<Integer> updatedTargetUserIds) { boolean changed = false; Loading @@ -2161,6 +2162,7 @@ public class UserManagerService extends IUserManager.Stub { * * @return restrictions set for a given target user. */ @GuardedBy("mRestrictionsLock") private @NonNull RestrictionsSet getDevicePolicyLocalRestrictionsForTargetUserLR( int targetUserId) { RestrictionsSet result = mDevicePolicyLocalUserRestrictions.get(targetUserId); Loading Loading @@ -2411,6 +2413,7 @@ public class UserManagerService extends IUserManager.Stub { mAppliedUserRestrictions.updateRestrictions(userId, new Bundle(effective)); } @GuardedBy("mRestrictionsLock") private void propagateUserRestrictionsLR(final int userId, Bundle newRestrictions, Bundle prevRestrictions) { // Note this method doesn't touch any state, meaning it doesn't require mRestrictionsLock Loading Loading @@ -2884,6 +2887,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeBitmapLP(UserInfo info, Bitmap bitmap) { try { File dir = new File(mUsersDir, Integer.toString(info.id)); Loading Loading @@ -3453,6 +3457,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeAllTargetUsersLP(int originatingUserId) { for (int i = 0; i < mDevicePolicyLocalUserRestrictions.size(); i++) { int targetUserId = mDevicePolicyLocalUserRestrictions.keyAt(i); Loading @@ -3463,6 +3468,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private void writeUserLP(UserData userData) { if (DBG) { debug("writeUserLP " + userData); Loading @@ -3486,6 +3492,7 @@ public class UserManagerService extends IUserManager.Stub { * <name>Primary</name> * </user> */ @GuardedBy({"mPackagesLock"}) @VisibleForTesting void writeUserLP(UserData userData, OutputStream os) throws IOException, XmlPullParserException { Loading Loading @@ -3638,6 +3645,7 @@ public class UserManagerService extends IUserManager.Stub { } } @GuardedBy({"mPackagesLock"}) private UserData readUserLP(int id) { FileInputStream fis = null; try { Loading @@ -3655,6 +3663,7 @@ public class UserManagerService extends IUserManager.Stub { return null; } @GuardedBy({"mPackagesLock"}) @VisibleForTesting UserData readUserLP(int id, InputStream is) throws IOException, XmlPullParserException { Loading Loading @@ -3827,6 +3836,7 @@ public class UserManagerService extends IUserManager.Stub { * * @return whether there were any restrictions. */ @GuardedBy({"mAppRestrictionsLock"}) private static boolean cleanAppRestrictionsForPackageLAr(String pkg, @UserIdInt int userId) { final File dir = Environment.getUserSystemDirectory(userId); final File resFile = new File(dir, packageToRestrictionsFileName(pkg)); Loading