am 84b4d37d: [Issue 2099206] Encoding phone number prior to sending it to the phone lookup filter
Merge commit '84b4d37dd1e9269f73c2a9cacadcd88ec4256e3f' into eclair-plus-aosp * commit '84b4d37dd1e9269f73c2a9cacadcd88ec4256e3f': [Issue 2099206] Encoding phone number prior to sending it to the phone lookup filter
This commit is contained in:
@@ -366,7 +366,8 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
|||||||
public void bindFromPhoneNumber(String number) {
|
public void bindFromPhoneNumber(String number) {
|
||||||
Cursor c = null;
|
Cursor c = null;
|
||||||
try {
|
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);
|
PHONE_LOOKUP_PROJECTION, null, null, null);
|
||||||
if (c != null && c.moveToFirst()) {
|
if (c != null && c.moveToFirst()) {
|
||||||
long contactId = c.getLong(PHONE_LOOKUP_CONTACT_ID_COLUMN_INDEX);
|
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);
|
CallerInfo info = getCallerInfo(context, contactUri);
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ public class CallerInfoAsyncQuery {
|
|||||||
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
|
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
|
||||||
OnQueryCompleteListener listener, Object cookie) {
|
OnQueryCompleteListener listener, Object cookie) {
|
||||||
//contruct the URI object and start Query.
|
//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();
|
CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();
|
||||||
c.allocate(context, contactRef);
|
c.allocate(context, contactRef);
|
||||||
|
|||||||
Reference in New Issue
Block a user