Merge "Use callable-filter capability when updating call log" into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cacba45993
@ -25,6 +25,7 @@ import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.provider.ContactsContract.CommonDataKinds.Callable;
|
||||
import android.provider.ContactsContract.CommonDataKinds.Phone;
|
||||
import android.provider.ContactsContract.DataUsageFeedback;
|
||||
import android.text.TextUtils;
|
||||
@ -312,10 +313,12 @@ public class CallLog {
|
||||
null);
|
||||
} else {
|
||||
final String phoneNumber = ci.phoneNumber != null ? ci.phoneNumber : number;
|
||||
cursor = resolver.query(Phone.CONTENT_URI,
|
||||
cursor = resolver.query(
|
||||
Uri.withAppendedPath(Callable.CONTENT_FILTER_URI,
|
||||
Uri.encode(phoneNumber)),
|
||||
new String[] { Phone._ID },
|
||||
Phone.CONTACT_ID + " =? AND " + Phone.NUMBER + " =?",
|
||||
new String[] { String.valueOf(ci.person_id), phoneNumber},
|
||||
Phone.CONTACT_ID + " =?",
|
||||
new String[] { String.valueOf(ci.person_id) },
|
||||
null);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user