summaryrefslogtreecommitdiffstats
path: root/core/java/android/accounts/AccountManager.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-03-14 10:48:07 -0700
committerAmith Yamasani <yamasani@google.com>2013-03-14 11:43:56 -0700
commit12b8e134c1c98d7eb90510fb79cc25dcf56b2cb0 (patch)
tree299d9d68bc34f08cb6cc8696adbf93139d22654a /core/java/android/accounts/AccountManager.java
parent03df4033728e6b943f36e51fbbce36067920c7b1 (diff)
downloadframeworks_base-12b8e134c1c98d7eb90510fb79cc25dcf56b2cb0.zip
frameworks_base-12b8e134c1c98d7eb90510fb79cc25dcf56b2cb0.tar.gz
frameworks_base-12b8e134c1c98d7eb90510fb79cc25dcf56b2cb0.tar.bz2
Move the account picker class name to a config resource.
For customization in derived products. Bug: 8379133 Change-Id: I1dba4734f322455f0b0dd9c009be2ddc8d6b7d22
Diffstat (limited to 'core/java/android/accounts/AccountManager.java')
-rw-r--r--core/java/android/accounts/AccountManager.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 6aac723..f8b7a0c 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -18,9 +18,11 @@ package android.accounts;
import android.app.Activity;
import android.content.Intent;
+import android.content.ComponentName;
import android.content.Context;
import android.content.IntentFilter;
import android.content.BroadcastReceiver;
+import android.content.res.Resources;
import android.database.SQLException;
import android.os.Bundle;
import android.os.Handler;
@@ -44,6 +46,7 @@ import java.util.concurrent.TimeUnit;
import java.util.HashMap;
import java.util.Map;
+import com.android.internal.R;
import com.google.android.collect.Maps;
/**
@@ -1777,8 +1780,11 @@ public class AccountManager {
};
// have many accounts, launch the chooser
Intent intent = new Intent();
- intent.setClassName("android",
- "android.accounts.ChooseAccountActivity");
+ ComponentName componentName = ComponentName.unflattenFromString(
+ Resources.getSystem().getString(
+ R.string.config_chooseAccountActivity));
+ intent.setClassName(componentName.getPackageName(),
+ componentName.getClassName());
intent.putExtra(KEY_ACCOUNTS, accounts);
intent.putExtra(KEY_ACCOUNT_MANAGER_RESPONSE,
new AccountManagerResponse(chooseResponse));
@@ -1934,7 +1940,10 @@ public class AccountManager {
String[] addAccountRequiredFeatures,
Bundle addAccountOptions) {
Intent intent = new Intent();
- intent.setClassName("android", "android.accounts.ChooseTypeAndAccountActivity");
+ ComponentName componentName = ComponentName.unflattenFromString(
+ Resources.getSystem().getString(R.string.config_chooseTypeAndAccountActivity));
+ intent.setClassName(componentName.getPackageName(),
+ componentName.getClassName());
intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNTS_ARRAYLIST,
allowableAccounts);
intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,