summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-12 22:10:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-12 22:10:04 +0000
commitaf049afaef6c2ca581be4214b8d9494117beb48c (patch)
tree3b7b7c94457fd96dabe6cb57a42cf91a18398826
parent477d4883cd6513ed95a4dfc1589d7ce3585a43fe (diff)
parent5a1e43bdd2c2a181a077337520ad2969c5655801 (diff)
Merge "Don't include voicemails in ALL call type filter." into mnc-dev
-rw-r--r--src/com/android/dialer/calllog/CallLogQueryHandler.java7
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) {