diff options
| author | 2017-10-11 20:32:40 +0000 | |
|---|---|---|
| committer | 2017-10-11 20:32:40 +0000 | |
| commit | d20cad62ee375c2f664ef89c9606412916edc3d8 (patch) | |
| tree | 1acefac006e5f72b7be101808e673ee4018c79b6 | |
| parent | a4f6ca3e77cc8bf4a09faab63180ef7f11829902 (diff) | |
| parent | 04b96d76a9a261787b9d9a138d2937d885daeede (diff) | |
DO NOT MERGE. KEY_INTENT shouldn't grant permissions.
am: 04b96d76a9
Change-Id: Ie2ae7f5071a534e1245c92293014963c8e4187ca
| -rw-r--r-- | services/core/java/com/android/server/accounts/AccountManagerService.java | 10 |
1 files changed, 10 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 3c6de07a33a7..e33d87265cfb 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -2000,6 +2000,11 @@ public class AccountManagerService Intent intent = result.getParcelable(AccountManager.KEY_INTENT); if (intent != null && notifyOnAuthFailure && !customTokens) { + intent.setFlags( + intent.getFlags() & ~(Intent.FLAG_GRANT_READ_URI_PERMISSION + | Intent.FLAG_GRANT_WRITE_URI_PERMISSION + | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION + | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION)); doNotification(mAccounts, account, result.getString(AccountManager.KEY_AUTH_FAILED_MESSAGE), intent, accounts.userId); @@ -3087,6 +3092,11 @@ public class AccountManagerService } if (result != null && (intent = result.getParcelable(AccountManager.KEY_INTENT)) != null) { + intent.setFlags( + intent.getFlags() & ~(Intent.FLAG_GRANT_READ_URI_PERMISSION + | Intent.FLAG_GRANT_WRITE_URI_PERMISSION + | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION + | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION)); /* * The Authenticator API allows third party authenticators to * supply arbitrary intents to other apps that they can run, |