Don't set user restrictions directly on USER_ALL.

Bug: 269984638

Test: btest a.d.c.InstallUnknownSourcesTest
Change-Id: Id71b1fb3af41afe722d336d33628bc1b222205c8
(cherry picked from commit b2d13e50b4)
Merged-In: Id71b1fb3af41afe722d336d33628bc1b222205c8
This commit is contained in:
Elis Elliott
2023-02-20 17:47:02 +00:00
committed by Cherrypicker Worker
parent 707732f452
commit fd5af1b03c

View File

@@ -2592,6 +2592,9 @@ public class UserManagerService extends IUserManager.Stub {
applyUserRestrictionsForAllUsersLR(); applyUserRestrictionsForAllUsersLR();
for (int i = 0; i < updatedUserIds.size(); i++) { for (int i = 0; i < updatedUserIds.size(); i++) {
if (updatedUserIds.get(i) == UserHandle.USER_ALL) {
continue;
}
applyUserRestrictionsLR(updatedUserIds.get(i)); applyUserRestrictionsLR(updatedUserIds.get(i));
} }
} }