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

Commit 4fe0b5d4 authored by Raj Yengisetty's avatar Raj Yengisetty
Browse files

Contacts: Update dialog with the correct selected count

Delete contacts
SIM import contacts

Repro:
- Open "Delete" from the overflow menu
- Select one contact and select done in action bar
- Observe: dialog shows 1 contact to delete
- Cancel dialog and select another contact for deletion
- Select done in action bar
- Observe: dialog still shows 1 contact to delete

Change-Id: Icd9ee29f102386a5b3642614e1f7c209318c7702
parent 9c9d002f
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -634,6 +634,22 @@ public class MultiPickContactActivity extends ListActivity implements
        return super.onCreateDialog(id, bundle);
    }

    @Override
    protected void onPrepareDialog(int id, Dialog dialog, Bundle bundle) {
        switch (id) {
            case R.id.dialog_delete_contact_confirmation:
                ((AlertDialog) dialog).setMessage(getResources().getQuantityString(
                        R.plurals.ContactMultiDeleteConfirmation,
                        mChoiceSet.size(), mChoiceSet.size()));
                break;
            case R.id.dialog_import_sim_contact_confirmation:
                ((AlertDialog) dialog).setMessage(getResources().getQuantityString(
                        R.plurals.ContactMultiImportConfirmation,
                        mChoiceSet.size(), mChoiceSet.size()));
                break;
        }
    }

    private class DeleteContactsThread extends Thread implements
            DialogInterface.OnCancelListener, DialogInterface.OnClickListener {
        boolean mCanceled = false;