Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 747c705e authored by kenshin's avatar kenshin
Browse files

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
parent 729af33b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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");