diff options
author | Raj Yengisetty <rajesh@cyngn.com> | 2015-01-27 14:41:44 -0800 |
---|---|---|
committer | Rajesh Yengisetty <rajesh@cyngn.com> | 2015-01-29 03:16:35 +0000 |
commit | 0b551a25627601effad4baaf1635dd6edd2bb034 (patch) | |
tree | 6714f0087becfdcebc8e9d0b5fc0bb4a13e35092 | |
parent | 00fdc4c145c6e1efedc5a1781426b868c6a93941 (diff) | |
download | android_packages_apps_ContactsCommon-0b551a25627601effad4baaf1635dd6edd2bb034.tar.gz android_packages_apps_ContactsCommon-0b551a25627601effad4baaf1635dd6edd2bb034.tar.bz2 android_packages_apps_ContactsCommon-0b551a25627601effad4baaf1635dd6edd2bb034.zip |
Quick Call: do not show quick call next to profile contact
Change-Id: Ia4bd6a59e0a27c64b64554251392e31ed6bdd917
(cherry picked from commit 8478fc2788ea3843a82e24eb5a802af134b6e183)
-rwxr-xr-x | src/com/android/contacts/common/list/ContactListAdapter.java | 2 | ||||
-rwxr-xr-x | src/com/android/contacts/common/list/ContactListItemView.java | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/contacts/common/list/ContactListAdapter.java b/src/com/android/contacts/common/list/ContactListAdapter.java index a3eb8cbe..b987e4d8 100755 --- a/src/com/android/contacts/common/list/ContactListAdapter.java +++ b/src/com/android/contacts/common/list/ContactListAdapter.java @@ -308,7 +308,7 @@ public abstract class ContactListAdapter extends ContactEntryListAdapter { protected void bindQuickCallView(final ContactListItemView view, Cursor cursor) { view.showQuickCallView(cursor, ContactQuery.CONTACT_HAS_NUMBER, - ContactQuery.CONTACT_LOOKUP_KEY); + ContactQuery.CONTACT_LOOKUP_KEY, ContactQuery.CONTACT_IS_USER_PROFILE); view.setOnQuickCallClickListener(mClickListener); } diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java index 91f063ff..0cd607f2 100755 --- a/src/com/android/contacts/common/list/ContactListItemView.java +++ b/src/com/android/contacts/common/list/ContactListItemView.java @@ -1257,9 +1257,11 @@ public class ContactListItemView extends ViewGroup } } - public void showQuickCallView(Cursor cursor, int numberColumIndex, int lookUpKey) { + public void showQuickCallView(Cursor cursor, int numberColumIndex, int lookUpKey, + int profileKey) { int hasNumber = cursor.getInt(numberColumIndex); - if (!(hasNumber == 0)) { + boolean isProfile = cursor.getInt(profileKey) == 1; + if (!(hasNumber == 0) && !isProfile) { getQuickCallView().setVisibility(View.VISIBLE); setQuickCallLookup(cursor.getString(lookUpKey)); } else { |