Update AccountManager getAccountVisibility method to better handle default cases.
Test: cts, manual
Change-Id: Ic0f8fef9f928fefa6cc32a91c471969f7d5a4e45
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 7d039ef..e5df278 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -288,7 +288,8 @@
}
/**
- * Account visibility was not set.
+ * Account visibility was not set. Default visibility value will be used.
+ * See {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE}, {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE}
*/
public static final int VISIBILITY_UNDEFINED = 0;
@@ -919,7 +920,14 @@
* Package name must match installed application, or be equal to
* {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE} or {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE}.
* <p>
- * See {@link #getAccountVisibility} for possible values.
+ * Possible visibility values:
+ * <ul>
+ * <li>{@link #VISIBILITY_UNDEFINED}</li>
+ * <li>{@link #VISIBILITY_VISIBLE}</li>
+ * <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li>
+ * <li>{@link #VISIBILITY_NOT_VISIBLE}
+ * <li>{@link #VISIBILITY_USER_MANAGED_NOT_VISIBLE}</li>
+ * </ul>
* <p>
* This method requires the caller to have a signature match with the authenticator that owns
* the specified account.
@@ -944,7 +952,6 @@
/**
* Get visibility of certain account for given application. Possible returned values are:
* <ul>
- * <li>{@link #VISIBILITY_UNDEFINED}</li>
* <li>{@link #VISIBILITY_VISIBLE}</li>
* <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li>
* <li>{@link #VISIBILITY_NOT_VISIBLE}