From 15a09e545e0fdab603f4fb105fe714a07d7b1a87 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Wed, 2 Mar 2016 14:24:44 -0800 Subject: Fixing missed call badge query + Previously the query for the missed calls only checked if the calllog is_read column was equal to 1. The situation where a callog entry exists because it was copied from another user's calllog (such as for File based encryption), the value of is_read is null rather than 0 or 1. + This CL updates the query to return those calllog entries that have null for is_read too. This logic matches the logic for making a calllog entry bold when it's unread. Bug: 27168340 Change-Id: I73dba6920a3eaf352feae4d23cc3f55d51bd1efd --- src/com/android/dialer/calllog/CallLogQueryHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/dialer/calllog/CallLogQueryHandler.java b/src/com/android/dialer/calllog/CallLogQueryHandler.java index 9ff74cfbc..3b493cf77 100644 --- a/src/com/android/dialer/calllog/CallLogQueryHandler.java +++ b/src/com/android/dialer/calllog/CallLogQueryHandler.java @@ -291,7 +291,7 @@ public class CallLogQueryHandler extends NoNullCursorAsyncQueryHandler { */ private String getUnreadMissedCallsQuery() { StringBuilder where = new StringBuilder(); - where.append(Calls.IS_READ).append(" = 0"); + where.append(Calls.IS_READ).append(" = 0 OR ").append(Calls.IS_READ).append(" IS NULL"); where.append(" AND "); where.append(Calls.TYPE).append(" = ").append(Calls.MISSED_TYPE); return where.toString(); -- cgit v1.2.3