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

Commit af049afa authored by Andrew Lee's avatar Andrew Lee Committed by Android (Google) Code Review
Browse files

Merge "Don't include voicemails in ALL call type filter." into mnc-dev

parents 477d4883 5a1e43bd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class CallLogQueryHandler extends NoNullCursorAsyncQueryHandler {

    /**
     * Call type similar to Calls.INCOMING_TYPE used to specify all types instead of one particular
     * type.
     * type. Exception: excludes Calls.VOICEMAIL_TYPE.
     */
    public static final int CALL_TYPE_ALL = -1;

@@ -167,10 +167,11 @@ public class CallLogQueryHandler extends NoNullCursorAsyncQueryHandler {

        if (callType > CALL_TYPE_ALL) {
            where.append(" AND ");
            // Add a clause to fetch only items of type voicemail.
            where.append(String.format("(%s = ?)", Calls.TYPE));
            // Add a clause to fetch only items newer than the requested date
            selectionArgs.add(Integer.toString(callType));
        } else {
            where.append(" AND NOT ");
            where.append("(" + Calls.TYPE + " = " + Calls.VOICEMAIL_TYPE + ")");
        }

        if (newerThan > 0) {