[Issue 2099206] Encoding phone number prior to sending it to the phone lookup filter
Change-Id: I80327febe7134ac1bdef958251943a9777879d53
This commit is contained in:
@@ -366,7 +366,8 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
||||
public void bindFromPhoneNumber(String number) {
|
||||
Cursor c = null;
|
||||
try {
|
||||
c = mContentResolver.query(Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, number),
|
||||
c = mContentResolver.query(
|
||||
Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)),
|
||||
PHONE_LOOKUP_PROJECTION, null, null, null);
|
||||
if (c != null && c.moveToFirst()) {
|
||||
long contactId = c.getLong(PHONE_LOOKUP_CONTACT_ID_COLUMN_INDEX);
|
||||
|
||||
@@ -250,7 +250,7 @@ public class CallerInfo {
|
||||
}
|
||||
}
|
||||
|
||||
Uri contactUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, number);
|
||||
Uri contactUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
|
||||
|
||||
CallerInfo info = getCallerInfo(context, contactUri);
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public class CallerInfoAsyncQuery {
|
||||
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
|
||||
OnQueryCompleteListener listener, Object cookie) {
|
||||
//contruct the URI object and start Query.
|
||||
Uri contactRef = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, number);
|
||||
Uri contactRef = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
|
||||
|
||||
CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();
|
||||
c.allocate(context, contactRef);
|
||||
|
||||
Reference in New Issue
Block a user