Add ACTION_ACCOUNT_REMOVED to Account Manager.
AccountManagerService sends an intent with the action when account of any type is removed or renamed.
Test: manual, APCT.
Bug: 37280078
Change-Id: I53b1bb9d6cde1edba5c37ecf3e4e13d748b19005
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 8052288..b320d5d 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -335,6 +335,7 @@
* are removed, or an account's credentials (saved password, etc) are changed.
*
* @see #addOnAccountsUpdatedListener
+ * @see #ACTION_ACCOUNT_REMOVED
*
* @deprecated use {@link #addOnAccountsUpdatedListener} to get account updates in runtime.
*/
@@ -344,6 +345,14 @@
"android.accounts.LOGIN_ACCOUNTS_CHANGED";
/**
+ * Action sent as a broadcast Intent by the AccountsService when any account is removed.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @BroadcastBehavior(includeBackground = true)
+ public static final String ACTION_ACCOUNT_REMOVED =
+ "android.accounts.action.ACCOUNT_REMOVED";
+
+ /**
* Action sent as a broadcast Intent to specific package by the AccountsService
* when account visibility or account's credentials (saved password, etc) are changed.
*