summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-02-04 04:23:00 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-04 04:23:00 -0800
commitabfeb4c90e0ada2cf7581c655313bdd4aa0d3623 (patch)
treebd1ae463037a7d2ac183e6e6a77f6b34c53d9195
parent4c9804c6a0438604fd34e9fbb9bb3c7e03b7d85b (diff)
parentdc3fa1437361b68af3ed35f88505ea885256f7cb (diff)
downloadandroid_packages_apps_ContactsCommon-abfeb4c90e0ada2cf7581c655313bdd4aa0d3623.tar.gz
android_packages_apps_ContactsCommon-abfeb4c90e0ada2cf7581c655313bdd4aa0d3623.tar.bz2
android_packages_apps_ContactsCommon-abfeb4c90e0ada2cf7581c655313bdd4aa0d3623.zip
Merge "Quick Call: do not show quick call next to profile contact"
-rwxr-xr-xsrc/com/android/contacts/common/list/ContactListAdapter.java2
-rw-r--r--src/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 bcde2e6e..281f7ea3 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -1295,9 +1295,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 {