summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Soulos <psoulos@google.com>2014-08-29 13:10:11 -0700
committerPaul Soulos <psoulos@google.com>2014-09-02 18:04:30 +0000
commitdca6ce7639857ee7a19332c8f35dc6cd228102fa (patch)
tree2586164b05e16d6178010751f53614a217a3deca /src
parent9bb1a80e499d7c5c673a043011ff921ca58788f7 (diff)
downloadpackages_apps_Contacts-dca6ce7639857ee7a19332c8f35dc6cd228102fa.tar.gz
packages_apps_Contacts-dca6ce7639857ee7a19332c8f35dc6cd228102fa.tar.bz2
packages_apps_Contacts-dca6ce7639857ee7a19332c8f35dc6cd228102fa.zip
Normalizes numbers before a CallLog query in Contact card
bug: 17309747 Change-Id: I49924ff0d7ec3a8fd80acae45b000106e81892c3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/contacts/interactions/CallLogInteractionsLoader.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/contacts/interactions/CallLogInteractionsLoader.java b/src/com/android/contacts/interactions/CallLogInteractionsLoader.java
index 9cbc0b492..14738be06 100644
--- a/src/com/android/contacts/interactions/CallLogInteractionsLoader.java
+++ b/src/com/android/contacts/interactions/CallLogInteractionsLoader.java
@@ -23,6 +23,7 @@ import android.database.Cursor;
import android.database.DatabaseUtils;
import android.net.Uri;
import android.provider.CallLog.Calls;
+import android.telephony.PhoneNumberUtils;
import com.android.internal.annotations.VisibleForTesting;
@@ -101,7 +102,8 @@ public class CallLogInteractionsLoader extends AsyncTaskLoader<List<ContactInter
}
private List<ContactInteraction> getCallLogInteractions(String phoneNumber) {
- final Uri uri = Uri.withAppendedPath(Calls.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
+ final Uri uri = Uri.withAppendedPath(Calls.CONTENT_FILTER_URI,
+ Uri.encode(PhoneNumberUtils.normalizeNumber(phoneNumber)));
// Append the LIMIT clause onto the ORDER BY clause. This won't cause crashes as long
// as we don't also set the {@link android.provider.CallLog.Calls.LIMIT_PARAM_KEY} that
// becomes available in KK.