AccountManager: Make account session APIs public api.
Change-Id: Ibdaa788fc63fd865c2731517aab9b719df4979da
diff --git a/core/java/android/accounts/AbstractAccountAuthenticator.java b/core/java/android/accounts/AbstractAccountAuthenticator.java
index 4dca8e2..c9e09e4 100644
--- a/core/java/android/accounts/AbstractAccountAuthenticator.java
+++ b/core/java/android/accounts/AbstractAccountAuthenticator.java
@@ -782,9 +782,7 @@
* @throws NetworkErrorException if the authenticator could not honor the
* request due to a network error
* @see #finishSession(AccountAuthenticatorResponse, String, Bundle)
- * @hide
*/
- @SystemApi
public Bundle startAddAccountSession(
final AccountAuthenticatorResponse response,
final String accountType,
@@ -840,9 +838,7 @@
* @throws NetworkErrorException if the authenticator could not honor the
* request due to a network error
* @see #finishSession(AccountAuthenticatorResponse, String, Bundle)
- * @hide
*/
- @SystemApi
public Bundle startUpdateCredentialsSession(
final AccountAuthenticatorResponse response,
final Account account,
@@ -888,16 +884,16 @@
* <li>{@link AccountManager#KEY_INTENT}, or
* <li>{@link AccountManager#KEY_ACCOUNT_NAME} and
* {@link AccountManager#KEY_ACCOUNT_TYPE} of the account that was
- * added or local credentials were updated, or
+ * added or local credentials were updated, and optional
+ * {@link AccountManager#KEY_ACCOUNT_STATUS_TOKEN} for checking
+ * the status of the account later, or
* <li>{@link AccountManager#KEY_ERROR_CODE} and
* {@link AccountManager#KEY_ERROR_MESSAGE} to indicate an error
* </ul>
* @throws NetworkErrorException if the authenticator could not honor the request due to a
* network error
* @see #startAddAccountSession and #startUpdateCredentialsSession
- * @hide
*/
- @SystemApi
public Bundle finishSession(
final AccountAuthenticatorResponse response,
final String accountType,
@@ -981,9 +977,7 @@
* </ul>
* @throws NetworkErrorException if the authenticator could not honor the request due to a
* network error
- * @hide
*/
- @SystemApi
public Bundle isCredentialsUpdateSuggested(
final AccountAuthenticatorResponse response,
Account account,
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 5cf59bc..88b1297 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -245,18 +245,14 @@
* Bundle key used for a {@link Bundle} in result from
* {@link #startAddAccountSession} and friends which returns session data
* for installing an account later.
- * @hide
*/
- @SystemApi
public static final String KEY_ACCOUNT_SESSION_BUNDLE = "accountSessionBundle";
/**
* Bundle key used for the {@link String} account status token in result
* from {@link #startAddAccountSession} and friends which returns
* information about a particular account.
- * @hide
*/
- @SystemApi
public static final String KEY_ACCOUNT_STATUS_TOKEN = "accountStatusToken";
public static final String ACTION_AUTHENTICATOR_INTENT =
@@ -2705,9 +2701,7 @@
* trouble
* </ul>
* @see #finishSession
- * @hide
*/
- @SystemApi
public AccountManagerFuture<Bundle> startAddAccountSession(
final String accountType,
final String authTokenType,
@@ -2789,9 +2783,7 @@
* trouble
* </ul>
* @see #finishSession
- * @hide
*/
- @SystemApi
public AccountManagerFuture<Bundle> startUpdateCredentialsSession(
final Account account,
final String authTokenType,
@@ -2850,6 +2842,8 @@
* <ul>
* <li>{@link #KEY_ACCOUNT_NAME} - the name of the account created
* <li>{@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * <li>{@link #KEY_ACCOUNT_STATUS_TOKEN} - optional, token to check
+ * status of the account
* </ul>
* If no activity was specified and additional information is needed
* from user, the returned Bundle may contains only
@@ -2869,9 +2863,7 @@
* trouble
* </ul>
* @see #startAddAccountSession and #startUpdateCredentialsSession
- * @hide
*/
- @SystemApi
public AccountManagerFuture<Bundle> finishSession(
final Bundle sessionBundle,
final Activity activity,
@@ -2931,9 +2923,7 @@
* @param handler {@link Handler} identifying the callback thread, null for the main thread
* @return An {@link AccountManagerFuture} which resolves to a Boolean, true if the credentials
* of the account should be updated.
- * @hide
*/
- @SystemApi
public AccountManagerFuture<Boolean> isCredentialsUpdateSuggested(
final Account account,
final String statusToken,