Show "Link" item when applicable and show correct toast for deletion.
b/25165853 is about the "Link" item. And this CL also does the following
things:
1. show toast for deleting 1/multiple contacts from PeopleActivity.
2. show toast when deletion happens in QuickContact and contact editor.
Bug: 25165853
Change-Id: Ia8ecb6b4118ecff3bc3ba50ac98ffadf337db52c
diff --git a/src/com/android/contacts/ContactSaveService.java b/src/com/android/contacts/ContactSaveService.java
index 1989606..fd117a4 100755
--- a/src/com/android/contacts/ContactSaveService.java
+++ b/src/com/android/contacts/ContactSaveService.java
@@ -1012,7 +1012,15 @@
final Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
getContentResolver().delete(contactUri, null, null);
}
- showToast(R.string.contacts_deleted_toast);
+ final String deleteToastMessage = getResources().getQuantityString(R.plurals
+ .contacts_deleted_toast, contactIds.length);
+ mMainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ Toast.makeText(ContactSaveService.this, deleteToastMessage, Toast.LENGTH_LONG)
+ .show();
+ }
+ });
}
/**