diff options
| author | 2017-05-10 12:45:02 -0700 | |
|---|---|---|
| committer | 2017-05-11 12:19:28 -0700 | |
| commit | 7b3ea13b177ca92f02a98fe0e1bea67b60abd084 (patch) | |
| tree | 79381cced748606fce9029e306cafc06a9d551ff | |
| parent | 897f88340969e7ad06cb978ff5e50bc4eecd23c9 (diff) | |
Don't request account access for apps if it is explictly made not visible to them.
Test: manual.
Bug: 38190080
Change-Id: Ifc9023cb37f05f29a2d2076dcff75b710efb6276
| -rw-r--r-- | services/core/java/com/android/server/accounts/AccountManagerService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 03da5b21fef8..9d2b86cf7fd5 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -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(); |