From becfee4a12643678bca26a79ed44fa06eea7cfd9 Mon Sep 17 00:00:00 2001 From: Evan Millar Date: Wed, 7 Oct 2009 09:26:59 -0700 Subject: [PATCH] Don't show a call button in the favorites list if the contact doesn't have a phone number Fixes bug http://b/issue?id=2151489 --- src/com/android/contacts/ContactsListActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java index c549c9d..a771265 100644 --- a/src/com/android/contacts/ContactsListActivity.java +++ b/src/com/android/contacts/ContactsListActivity.java @@ -2463,8 +2463,10 @@ public class ContactsListActivity extends ListActivity implements cache.nameView.setText(mUnknownNameText); } + boolean hasPhone = cursor.getInt(SUMMARY_HAS_PHONE_COLUMN_INDEX) != 0; + // Make the call button visible if requested. - if (mDisplayCallButton) { + if (mDisplayCallButton && hasPhone) { int pos = cursor.getPosition(); cache.callView.setVisibility(View.VISIBLE); cache.callButton.setTag(pos); -- 2.11.0