Add a generic account chooser/add account flow for apps.
The activity is launched as follows:
Account account1 = new Account("account1@gmail.com", "com.google")
Account account2 = new Account("account2@gmail.com", "com.google")
ArrayList<Account> accounts = new ArrayList<Account>();
accounts.add(account1);
accounts.add(account2);
String[] accountTypes = new String[]{"com.google", "com.android.exchange"};
Bundle addAccountOptions = null;
Intent intent = AccountManager.newChooseAccountIntent(account1, accounts,
accountTypes, addAccountOptions);
startActivityForResult(intent, 0);
Change-Id: I05a467bdc3552a2e39397b0182879351f4324389
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 9f2eef5..80741eb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1530,6 +1530,26 @@
android:process=":ui">
</activity>
+ <activity android:name="android.accounts.ChooseTypeAndAccountActivity"
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@android:style/Theme.Holo.Dialog"
+ android:label="@string/choose_account_label"
+ android:process=":ui">
+ <intent-filter>
+ <action android:name="android.intent.action.PICK" />
+ <category android:name="android.intent.category.ACCOUNT" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name="android.accounts.ChooseAccountTypeActivity"
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@android:style/Theme.Holo.Dialog"
+ android:label="@string/choose_account_label"
+ android:process=":ui">
+ </activity>
+
<activity android:name="android.accounts.GrantCredentialsPermissionActivity"
android:excludeFromRecents="true"
android:exported="true"