Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a77253a4 authored by Fred Quintana's avatar Fred Quintana
Browse files

An extra is being written as one type and read as the wrong type.

Bug: 5342556
Change-Id: I664bd84546cb8da2936c5afe65381336a97ef5cd
parent d88324d8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -56,10 +56,10 @@ public class ChooseAccountTypeActivity extends Activity implements AccountManage


        // Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
        // Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
        Set<String> setOfAllowableAccountTypes = null;
        Set<String> setOfAllowableAccountTypes = null;
        ArrayList<String> validAccountTypes = getIntent().getStringArrayListExtra(
        String[] validAccountTypes = getIntent().getStringArrayExtra(
                ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
                ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
        if (validAccountTypes != null) {
        if (validAccountTypes != null) {
            setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
            setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
            for (String type : validAccountTypes) {
            for (String type : validAccountTypes) {
                setOfAllowableAccountTypes.add(type);
                setOfAllowableAccountTypes.add(type);
            }
            }
+6 −6
Original line number Original line Diff line number Diff line
@@ -141,10 +141,10 @@ public class ChooseTypeAndAccountActivity extends Activity {


        // Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
        // Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
        Set<String> setOfAllowableAccountTypes = null;
        Set<String> setOfAllowableAccountTypes = null;
        final ArrayList<String> validAccountTypes =
        final String[] validAccountTypes =
                intent.getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
                intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
        if (validAccountTypes != null) {
        if (validAccountTypes != null) {
            setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
            setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
            for (String type : validAccountTypes) {
            for (String type : validAccountTypes) {
                setOfAllowableAccountTypes.add(type);
                setOfAllowableAccountTypes.add(type);
            }
            }
@@ -266,14 +266,14 @@ public class ChooseTypeAndAccountActivity extends Activity {


    private void startChooseAccountTypeActivity() {
    private void startChooseAccountTypeActivity() {
        final Intent intent = new Intent(this, ChooseAccountTypeActivity.class);
        final Intent intent = new Intent(this, ChooseAccountTypeActivity.class);
        intent.putStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
        intent.putExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
                getIntent().getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY));
                getIntent().getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY));
        intent.putExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE,
        intent.putExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE,
                getIntent().getBundleExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE));
                getIntent().getBundleExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE));
        intent.putExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY,
        intent.putExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY,
                getIntent().getStringArrayExtra(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,
        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);
        startActivityForResult(intent, 0);
    }
    }