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

Commit 7e028153 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am fb37bb67: am 73094fbc: Merge "Don\'t allow non-authorized apps to access...

am fb37bb67: am 73094fbc: Merge "Don\'t allow non-authorized apps to access auth tokens" into jb-mr2-dev

* commit 'fb37bb67':
  Don't allow non-authorized apps to access auth tokens
parents b68de582 fb37bb67
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1262,6 +1262,11 @@ public class AccountManagerService
        final boolean customTokens =
            authenticatorInfo != null && authenticatorInfo.type.customTokens;

        // Check to see that the app is authorized to access the account, in case it's a
        // restricted account.
        if (!ArrayUtils.contains(getAccounts((String) null), account)) {
            throw new IllegalArgumentException("no such account");
        }
        // skip the check if customTokens
        final int callerUid = Binder.getCallingUid();
        final boolean permissionGranted = customTokens ||