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

Commit 5a1e43bd authored by Andrew Lee's avatar Andrew Lee
Browse files

Don't include voicemails in ALL call type filter.

Bug: 21814327
Change-Id: I6f59781ba5f8e5e396d919fefed6bfd76ec9e206
parent 44919b04
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) {