Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b2fe425 authored by Adam Bookatz's avatar Adam Bookatz Committed by Android (Google) Code Review
Browse files

Merge "isForegroundUserAdmin should getCurrentUserId outside of mUsersLock" into main

parents 4dc1d354 82cb5697
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2913,9 +2913,9 @@ public class UserManagerService extends IUserManager.Stub {
    @Override
    public boolean isForegroundUserAdmin() {
        // No permission requirements for this API.
        synchronized (mUsersLock) {
        final int currentUserId = getCurrentUserId();
        if (currentUserId != UserHandle.USER_NULL) {
            synchronized (mUsersLock) {
                final UserInfo userInfo = getUserInfoLU(currentUserId);
                return userInfo != null && userInfo.isAdmin();
            }