[ChooseAccount/AccountManager.newChooseAccountIntent Bug Fixes]
Fixing lots of bugs related to the ChooseAccount Activities.
1. Fix jank which is seen when no accounts are present on the device.
2. After addition of the account, return to the user.
3. Don't crash when the user provides null to allowableAccountTypes.
4. Updated documentation of AccountManager#newChooseAccountIntent.
5. Fix NPE.
Bug: 13104800
Bug: 17926560
Bug: 9626001
Change-Id: I0d1913e46560cfb458526a7c930a38049602d8f1
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index fd40d99..31e129b 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -2326,7 +2326,8 @@
* shown. If not specified then this field will not limit the displayed accounts.
* @param allowableAccountTypes an optional string array of account types. These are used
* both to filter the shown accounts and to filter the list of account types that are shown
- * when adding an account.
+ * when adding an account. If not specified then this field will not limit the displayed
+ * account types when adding an account.
* @param alwaysPromptForAccount if set the account chooser screen is always shown, otherwise
* it is only shown when there is more than one account from which to choose
* @param descriptionOverrideText if non-null this string is used as the description in the