From 5a1e43bdd2c2a181a077337520ad2969c5655801 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 12 Jun 2015 14:45:02 -0700 Subject: Don't include voicemails in ALL call type filter. Bug: 21814327 Change-Id: I6f59781ba5f8e5e396d919fefed6bfd76ec9e206 --- src/com/android/dialer/calllog/CallLogQueryHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/com') diff --git a/src/com/android/dialer/calllog/CallLogQueryHandler.java b/src/com/android/dialer/calllog/CallLogQueryHandler.java index a0e563aef..60bdcff46 100644 --- a/src/com/android/dialer/calllog/CallLogQueryHandler.java +++ b/src/com/android/dialer/calllog/CallLogQueryHandler.java @@ -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) { -- cgit v1.2.3