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

Commit 6d29c04a authored by yaolu's avatar yaolu
Browse files

Update default account list in settings on account change

Update default account list when creating dialog to reflect account removal/addition.

Bug 30436629

Change-Id: Ib624fb290e1a7072f9816fb0627870648926cb30
parent f5b39642
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.AlertDialog;
import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;
import android.view.View;

import com.android.contacts.common.model.AccountTypeManager;
import com.android.contacts.common.model.account.AccountType;
@@ -45,6 +46,12 @@ public class DefaultAccountPreference extends ListPreference {
        prepare();
    }

    @Override
    protected View onCreateDialogView() {
        prepare();
        return super.onCreateDialogView();
    }

    private void prepare() {
        mPreferences = new ContactsPreferences(getContext());
        mAccountMap = new HashMap<>();