summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-02-05 16:46:24 -0800
committerRaj Yengisetty <rajesh@cyngn.com>2015-02-05 16:46:28 -0800
commit4fe0b5d499e6fcf9cc212de28cf7988439932627 (patch)
tree69a1e6daeead9bc2d4ef43dd2f77157cc48def56
parent9c9d002f1cb8968805f16ccf2ae026d5d6048840 (diff)
downloadpackages_apps_Contacts-4fe0b5d499e6fcf9cc212de28cf7988439932627.tar.gz
packages_apps_Contacts-4fe0b5d499e6fcf9cc212de28cf7988439932627.tar.bz2
packages_apps_Contacts-4fe0b5d499e6fcf9cc212de28cf7988439932627.zip
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
-rw-r--r--src/com/android/contacts/activities/MultiPickContactActivity.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/contacts/activities/MultiPickContactActivity.java b/src/com/android/contacts/activities/MultiPickContactActivity.java
index 17b1b53a8..2d97a3693 100644
--- a/src/com/android/contacts/activities/MultiPickContactActivity.java
+++ b/src/com/android/contacts/activities/MultiPickContactActivity.java
@@ -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;