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

Commit 060c98af authored by Aseem Kumar's avatar Aseem Kumar Committed by Android (Google) Code Review
Browse files

Merge "Improve logs in addAccountExplicitly"

parents 669e7a1d b0654810
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -482,14 +482,13 @@ public class AccountManagerService
        Bundle.setDefusable(extras, true);
        int callingUid = Binder.getCallingUid();
        int userId = UserHandle.getCallingUserId();
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "addAccountExplicitly: " + account + ", caller's uid " + callingUid
                    + ", pid " + Binder.getCallingPid());
        }
        Objects.requireNonNull(account, "account cannot be null");
        Log.v(TAG, "addAccountExplicitly: caller's uid=" + callingUid + ", pid="
                + Binder.getCallingPid() + ", packageName=" + opPackageName + ", accountType="
                + account.type);
        if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
            String msg = String.format("uid %s cannot explicitly add accounts of type: %s",
                    callingUid, account.type);
            String msg = String.format("uid=%s, package=%s cannot explicitly add "
                    + "accounts of type: %s", callingUid, opPackageName, account.type);
            throw new SecurityException(msg);
        }
        /*