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

Commit f936855d authored by Bookatz's avatar Bookatz
Browse files

UserManager.setUserName: clearCallingId pre-Broadcast

UserManagerService.setUserName sends a broadcast to all users.
Without doing clearCallingIdentity first, it would require
INTERACT_ACROSS_USERS permission, which is not required for
this function.

Bug: 128576953
Test: Manual
Change-Id: Ia577248f48234eb9b73e53f9f9da04a86c324e12
parent a091cc2d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1299,7 +1299,12 @@ public class UserManagerService extends IUserManager.Stub {
            }
        }
        if (changed) {
            long ident = Binder.clearCallingIdentity();
            try {
                sendUserInfoChangedBroadcast(userId);
            } finally {
                Binder.restoreCallingIdentity(ident);
            }
        }
    }