diff options
author | Andrew Lee <anwlee@google.com> | 2015-06-12 14:45:02 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-06-12 15:05:34 -0700 |
commit | 5a1e43bdd2c2a181a077337520ad2969c5655801 (patch) | |
tree | 537c4c202b6c7e1a0bbff577f1902cc30d13ba42 /src | |
parent | 44919b041bd28792e18cfa65ea6868da3d8b9f52 (diff) |
Don't include voicemails in ALL call type filter.
Bug: 21814327
Change-Id: I6f59781ba5f8e5e396d919fefed6bfd76ec9e206
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogQueryHandler.java | 7 |
1 files changed, 4 insertions, 3 deletions
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) { |