summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-08-02 16:45:05 -0700
committerEric Erfanian <erfanian@google.com>2017-08-03 08:32:51 -0700
commit6e5b29c87982bc39303712a9b14c728b85031cfd (patch)
tree8bea0b56277ddd00eb7959dca4db5c9a3b8dbdba /java
parent784739f73e968e33dbcae9e2a5951b78467c53ad (diff)
Lightbringer video calling now no longer overrides IMS video calling.
If a user has IMS video calling and Lightbringer video calling enabled, when they searched for a contact through dialer search, they would perform a lightbring video call. This was unintended as IMS should have priority. Bug: 64125770 Test: ContactListItemViewTest PiperOrigin-RevId: 164058129 Change-Id: Ib2919857ffebd71d7911011274df0a6d07960d5f
Diffstat (limited to 'java')
-rw-r--r--java/com/android/contacts/common/list/PhoneNumberListAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
index b7427985b..dee51091f 100644
--- a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
+++ b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
@@ -27,6 +27,7 @@ import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.CommonDataKinds.SipAddress;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Directory;
+import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
@@ -357,7 +358,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
bindPhoneNumber(view, cursor, directory.isDisplayNumber(), position);
}
- protected void bindPhoneNumber(
+ @VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
+ public void bindPhoneNumber(
ContactListItemView view, Cursor cursor, boolean displayNumber, int position) {
CharSequence label = null;
if (displayNumber && !cursor.isNull(PhoneQuery.PHONE_TYPE)) {
@@ -397,7 +399,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
}
}
- if (LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) {
+ if (action == ContactListItemView.NONE
+ && LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) {
action = ContactListItemView.LIGHTBRINGER;
}