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
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 @@
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);