OSDN Git Service

Don't show a call button in the favorites list if the contact doesn't have a phone...
authorEvan Millar <emillar@google.com>
Wed, 7 Oct 2009 16:26:59 +0000 (09:26 -0700)
committerEvan Millar <emillar@google.com>
Thu, 8 Oct 2009 17:50:58 +0000 (10:50 -0700)
Fixes bug http://b/issue?id=2151489

src/com/android/contacts/ContactsListActivity.java

index c549c9d..a771265 100644 (file)
@@ -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);