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

Commit f3d4c0f9 authored by Kholoud Mohamed's avatar Kholoud Mohamed Committed by Android (Google) Code Review
Browse files

Merge "Fix bug in UserManager#getUserName" into sc-dev

parents 493a8a1a c34a6381
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1544,7 +1544,7 @@ public class UserManagerService extends IUserManager.Stub {
    public String getUserName() {
        final int callingUid = Binder.getCallingUid();
        if (!hasManageOrCreateUsersPermission()
                || hasPermissionGranted(
                && !hasPermissionGranted(
                        android.Manifest.permission.GET_ACCOUNTS_PRIVILEGED, callingUid)) {
            throw new SecurityException("You need MANAGE_USERS or CREATE_USERS or "
                    + "GET_ACCOUNTS_PRIVILEGED permissions to: get user name");