commit | 84963bdc462b9ca61579300d3ccbc4d14a0f37f7 | [log] [tgz] |
---|---|---|
author | Daniel Lehmann <lehmannd@google.com> | Tue Oct 26 12:02:51 2010 -0700 |
committer | Daniel Lehmann <lehmannd@google.com> | Tue Oct 26 12:02:51 2010 -0700 |
tree | 65d948757f2faca6b68af58c0ec52c62252b2bd7 | |
parent | a454728fb0392c15c914d07fc990c2ad2243ed9d [diff] |
Don't show QuickContact if contact is not found. Show Toast instead Bug:2953916 Change-Id: I668190e4354b603cecedd128d98332c8133ca592
diff --git a/src/com/android/contacts/quickcontact/QuickContactWindow.java b/src/com/android/contacts/quickcontact/QuickContactWindow.java index 454ac70..cf2e81d 100644 --- a/src/com/android/contacts/quickcontact/QuickContactWindow.java +++ b/src/com/android/contacts/quickcontact/QuickContactWindow.java
@@ -1180,6 +1180,11 @@ */ private void handleData(Cursor cursor) { if (cursor == null) return; + if (cursor.getCount() == 0) { + Toast.makeText(mContext, R.string.invalidContactMessage, Toast.LENGTH_LONG).show(); + dismiss(); + return; + } if (!isMimeExcluded(Contacts.CONTENT_ITEM_TYPE)) { // Add the profile shortcut action