diff options
author | kenshin <foufou33@gmail.com> | 2012-05-19 20:35:48 -0400 |
---|---|---|
committer | kenshin <foufou33@gmail.com> | 2012-05-20 13:05:59 -0400 |
commit | 747c705e12e25af5413ff11294cae095959ebc1b (patch) | |
tree | 186b71de913a7b98aa7cd6783a28020d3e4b23dc | |
parent | 729af33b2e5069ea124f55158b1f13920731a6f8 (diff) | |
download | packages_apps_Contacts-747c705e12e25af5413ff11294cae095959ebc1b.tar.gz packages_apps_Contacts-747c705e12e25af5413ff11294cae095959ebc1b.tar.bz2 packages_apps_Contacts-747c705e12e25af5413ff11294cae095959ebc1b.zip |
queryContactInfoForPhoneNumber:query only incoming
If information there is to find it would be in incoming calls.
Plus If the non contcat phone is called the name is replaced with
and empty one. This remedies to that.
*removed tabs and extra spaces
Change-Id: Ib23cba3077977b76d87b1d64a464197c4cf22955
-rw-r--r-- | src/com/android/contacts/calllog/ContactInfoHelper.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/contacts/calllog/ContactInfoHelper.java b/src/com/android/contacts/calllog/ContactInfoHelper.java index cee9d977e..cfc288353 100644 --- a/src/com/android/contacts/calllog/ContactInfoHelper.java +++ b/src/com/android/contacts/calllog/ContactInfoHelper.java @@ -219,10 +219,12 @@ public class ContactInfoHelper { // The "contactNumber" is a regular phone number, so use the CallLog table. Uri uri = Uri.withAppendedPath(CallLog.Calls.CONTENT_FILTER_URI, Uri.encode(contactNumber)); + //if we ought to find something it would be in incmoning calls + String selectionClause = " " + CallLog.Calls.TYPE + " = " + CallLog.Calls.INCOMING_TYPE; Cursor c = mContext.getContentResolver().query( uri, CallLogQuery._PROJECTION, - null, + selectionClause, null, Calls.DEFAULT_SORT_ORDER + " LIMIT 1"); |