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

Commit 5e57449b authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "Resolve READ_PRIVILEGED_PHONE_STATE bypass" into main

parents 1b25e1db 5fc96733
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3600,10 +3600,11 @@ public class TelecomServiceImpl {
        // Note: Important to clear the calling identity since the code below calls into RoleManager
        // Note: Important to clear the calling identity since the code below calls into RoleManager
        // to check who holds the dialer role, and that requires MANAGE_ROLE_HOLDERS permission
        // to check who holds the dialer role, and that requires MANAGE_ROLE_HOLDERS permission
        // which is a system permission.
        // which is a system permission.
        int callingUserId = Binder.getCallingUserHandle().getIdentifier();
        long token = Binder.clearCallingIdentity();
        long token = Binder.clearCallingIdentity();
        try {
        try {
            return mDefaultDialerCache.isDefaultOrSystemDialer(
            return mDefaultDialerCache.isDefaultOrSystemDialer(
                    callingPackage, Binder.getCallingUserHandle().getIdentifier());
                    callingPackage, callingUserId);
        } finally {
        } finally {
            Binder.restoreCallingIdentity(token);
            Binder.restoreCallingIdentity(token);
        }
        }