summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2011-09-19 15:28:18 -0700
committerFred Quintana <fredq@google.com>2011-09-19 16:26:37 -0700
commita77253a417e885f87280901a3519412262758412 (patch)
treec470673193ed48be195d9e0b15f4a61182bb3b16 /core/java/android
parentd88324d8ab8b98bbc2c21551be3a8981ee431181 (diff)
downloadframeworks_base-a77253a417e885f87280901a3519412262758412.zip
frameworks_base-a77253a417e885f87280901a3519412262758412.tar.gz
frameworks_base-a77253a417e885f87280901a3519412262758412.tar.bz2
An extra is being written as one type and read as the wrong type.
Bug: 5342556 Change-Id: I664bd84546cb8da2936c5afe65381336a97ef5cd
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/accounts/ChooseAccountTypeActivity.java4
-rw-r--r--core/java/android/accounts/ChooseTypeAndAccountActivity.java12
2 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/accounts/ChooseAccountTypeActivity.java b/core/java/android/accounts/ChooseAccountTypeActivity.java
index f53e6f3..5239e8c 100644
--- a/core/java/android/accounts/ChooseAccountTypeActivity.java
+++ b/core/java/android/accounts/ChooseAccountTypeActivity.java
@@ -56,10 +56,10 @@ public class ChooseAccountTypeActivity extends Activity implements AccountManage
// Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
Set<String> setOfAllowableAccountTypes = null;
- ArrayList<String> validAccountTypes = getIntent().getStringArrayListExtra(
+ String[] validAccountTypes = getIntent().getStringArrayExtra(
ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
if (validAccountTypes != null) {
- setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
+ setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
for (String type : validAccountTypes) {
setOfAllowableAccountTypes.add(type);
}
diff --git a/core/java/android/accounts/ChooseTypeAndAccountActivity.java b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
index b4030b9..852c4dd 100644
--- a/core/java/android/accounts/ChooseTypeAndAccountActivity.java
+++ b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
@@ -141,10 +141,10 @@ public class ChooseTypeAndAccountActivity extends Activity {
// Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
Set<String> setOfAllowableAccountTypes = null;
- final ArrayList<String> validAccountTypes =
- intent.getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
+ final String[] validAccountTypes =
+ intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
if (validAccountTypes != null) {
- setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
+ setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
for (String type : validAccountTypes) {
setOfAllowableAccountTypes.add(type);
}
@@ -266,14 +266,14 @@ public class ChooseTypeAndAccountActivity extends Activity {
private void startChooseAccountTypeActivity() {
final Intent intent = new Intent(this, ChooseAccountTypeActivity.class);
- intent.putStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
- getIntent().getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY));
+ intent.putExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
+ getIntent().getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY));
intent.putExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE,
getIntent().getBundleExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE));
intent.putExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY,
getIntent().getStringArrayExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY));
intent.putExtra(EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING,
- getIntent().getStringArrayExtra(EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING));
+ getIntent().getStringExtra(EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING));
startActivityForResult(intent, 0);
}