From 0d9f9087e5a4a9d93dfc5e2bc691f44db1deebd8 Mon Sep 17 00:00:00 2001 From: Sarmad Hashmi Date: Mon, 14 Mar 2016 13:29:43 -0700 Subject: Potential fix for voicemail icon near dialer but no voicemail. +Only count voicemails that are unread and have not been marked for deletion. BUG=27548694 Change-Id: I8d6707087bd4a400eb073ac4c2c7e2689a065052 --- src/com/android/dialer/calllog/CallLogQueryHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android/dialer') diff --git a/src/com/android/dialer/calllog/CallLogQueryHandler.java b/src/com/android/dialer/calllog/CallLogQueryHandler.java index d1591e1f2..cf86bad7f 100644 --- a/src/com/android/dialer/calllog/CallLogQueryHandler.java +++ b/src/com/android/dialer/calllog/CallLogQueryHandler.java @@ -168,8 +168,10 @@ public class CallLogQueryHandler extends NoNullCursorAsyncQueryHandler { public void fetchVoicemailUnreadCount() { if (TelecomUtil.hasReadWriteVoicemailPermissions(mContext)) { + // Only count voicemails that have not been read and have not been deleted. startQuery(QUERY_VOICEMAIL_UNREAD_COUNT_TOKEN, null, Voicemails.CONTENT_URI, - new String[] { Voicemails._ID }, Voicemails.IS_READ + "=0", null, null); + new String[] { Voicemails._ID }, + Voicemails.IS_READ + "=0" + " AND " + Voicemails.DELETED + "=0", null, null); } } -- cgit v1.2.3