From 6e5b29c87982bc39303712a9b14c728b85031cfd Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Wed, 2 Aug 2017 16:45:05 -0700 Subject: 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 --- java/com/android/contacts/common/list/PhoneNumberListAdapter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'java/com/android') 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; } -- cgit v1.2.3