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

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

fix a system crash that occurs when ChooseAccountActivity is

restarted from the icicle

http://b/issue?id=2352368
parent 96d92f19
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -36,14 +36,15 @@ public class ChooseAccountActivity extends ListActivity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (savedInstanceState == null) {
        mAccounts = getIntent().getParcelableArrayExtra(AccountManager.KEY_ACCOUNTS);
        mAccountManagerResponse =
                getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE);
        } else {
            mAccounts = savedInstanceState.getParcelableArray(AccountManager.KEY_ACCOUNTS);
            mAccountManagerResponse =
                    savedInstanceState.getParcelable(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE);

        // KEY_ACCOUNTS is a required parameter
        if (mAccounts == null) {
            setResult(RESULT_CANCELED);
            finish();
            return;
        }

        String[] mAccountNames = new String[mAccounts.length];