summaryrefslogtreecommitdiff
path: root/core/java/android/accounts/AccountManager.java
diff options
context:
space:
mode:
authorDmitry Dementyev <dementyev@google.com>2017-04-05 12:43:26 -0700
committerDmitry Dementyev <dementyev@google.com>2017-04-07 17:50:00 +0000
commitd6f0672e883f506c965ce6a05c9acdfa375af9e6 (patch)
treec72ace03767b29c05cce8f4b77c38b36c51bd1bf /core/java/android/accounts/AccountManager.java
parent3d82322c7ce541450648a3f1d144e40e2d884d2d (diff)
Make visible only accounts for which authenticator supports contacts operations
for callers with READ_CONTACTS permission. Test: manual Bug: 36983643 Change-Id: I1239a30a71cb13ce9ffff6f38b8506e9686abe4d (cherry picked from commit d7e7a74179c51a36845c35614ac3247c13474fca)
Diffstat (limited to 'core/java/android/accounts/AccountManager.java')
-rw-r--r--core/java/android/accounts/AccountManager.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 2a2fdbd272d3..80522886c78f 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -364,11 +364,19 @@ public class AccountManager {
"android.accounts.key_legacy_visible";
/**
- * Key to set visibility for applications targeting API level below
- * {@link android.os.Build.VERSION_CODES#O} with
- * {@link android.Manifest.permission#GET_ACCOUNTS} permission, or applications with any
- * targeting API level with the same signature as authenticator. See
- * {@link #getAccountVisibility}. If the value was not set by authenticator
+ * Key to set visibility for applications which satisfy one of the following conditions:
+ * <ul>
+ * <li>Target API level below {@link android.os.Build.VERSION_CODES#O} and have
+ * deprecated {@link android.Manifest.permission#GET_ACCOUNTS} permission.
+ * </li>
+ * <li> Have {@link android.Manifest.permission#GET_ACCOUNTS_PRIVILEGED} permission. </li>
+ * <li> Have the same signature as authenticator. </li>
+ * <li> Have {@link android.Manifest.permission#READ_CONTACTS} permission and
+ * account type may be associated with contacts data - (verified by
+ * {@link android.Manifest.permission#WRITE_CONTACTS} permission check for the authenticator).
+ * </li>
+ * </ul>
+ * See {@link #getAccountVisibility}. If the value was not set by authenticator
* {@link #VISIBILITY_USER_MANAGED_VISIBLE} is used.
*/
public static final String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE =