summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-01-27 14:41:44 -0800
committerRaj Yengisetty <rajesh@cyngn.com>2015-01-27 14:41:44 -0800
commit8478fc2788ea3843a82e24eb5a802af134b6e183 (patch)
tree6f503eb59386f2083963b47cce43775ba245838c
parent8df84539976799d648075eb22ebb95a3a764e1db (diff)
downloadandroid_packages_apps_ContactsCommon-8478fc2788ea3843a82e24eb5a802af134b6e183.tar.gz
android_packages_apps_ContactsCommon-8478fc2788ea3843a82e24eb5a802af134b6e183.tar.bz2
android_packages_apps_ContactsCommon-8478fc2788ea3843a82e24eb5a802af134b6e183.zip
Quick Call: do not show quick call next to profile contact
Change-Id: Ia4bd6a59e0a27c64b64554251392e31ed6bdd917
-rwxr-xr-xsrc/com/android/contacts/common/list/ContactListAdapter.java2
-rwxr-xr-xsrc/com/android/contacts/common/list/ContactListItemView.java6
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 5f57376e..e6369977 100755
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -1261,9 +1261,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 {