summaryrefslogtreecommitdiff
path: root/InCallUI/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-09-04 13:57:46 -0700
committerAndrew Lee <anwlee@google.com>2015-09-04 13:57:46 -0700
commit8e4787e7b3d981d45ff6621a5b49f632b27823f9 (patch)
tree2edfea76da2e167ed01b19c55eca027ece15d269 /InCallUI/src
parentd9b158b71547178343bc7b8efb887b11c0db1789 (diff)
Use Dialer utility for getting LookupUri.
The intention is to consolidate how InCall and Dialer do Contact lookups, but it's actually hard to do this truly without more refactoring because they have different model and query numbers. Just get the same URI for the initial lookup now... specific casing, such as in the secondary lookups if the initial SIP query fails, is still implemented separately in ContactInfoHelper and CallerInfo#doSecondaryLookupIfNecessary. Bug: 19993243 Change-Id: I8c5fd75d3cda84607d5ee5858b2b73adf20eebb8
Diffstat (limited to 'InCallUI/src')
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
index 046b77745..ec2296f86 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
@@ -29,6 +29,7 @@ import android.provider.ContactsContract.PhoneLookup;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
+import com.android.dialer.calllog.ContactInfoHelper;
import com.android.contacts.common.util.PhoneNumberHelper;
import com.android.contacts.common.util.TelephonyManagerUtils;
@@ -343,11 +344,7 @@ public class CallerInfoAsyncQuery {
// Construct the URI object and query params, and start the query.
- final Uri contactRef = PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.buildUpon()
- .appendPath(info.phoneNumber)
- .appendQueryParameter(PhoneLookup.QUERY_PARAMETER_SIP_ADDRESS,
- String.valueOf(PhoneNumberHelper.isUriNumber(info.phoneNumber)))
- .build();
+ final Uri contactRef = ContactInfoHelper.getContactInfoLookupUri(info.phoneNumber);
if (DBG) {
Log.d(LOG_TAG, "==> contactRef: " + sanitizeUriToString(contactRef));