Merge "Don't request account access for apps if it is explictly made not visible to them." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-15 21:07:35 +00:00
committed by Android (Google) Code Review

View File

@@ -5922,6 +5922,13 @@ public class AccountManagerService
return;
}
int visibility =
resolveAccountVisibility(account, packageName, getUserAccounts(userId));
if (visibility == AccountManager.VISIBILITY_NOT_VISIBLE) {
Slog.w(TAG, "requestAccountAccess: account is hidden");
return;
}
if (AccountManagerService.this.hasAccountAccess(account, packageName,
new UserHandle(userId))) {
Bundle result = new Bundle();