diff options
author | zachh <zachh@google.com> | 2018-04-17 15:55:02 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-17 16:50:13 -0700 |
commit | 3782a27fa4785ce3fe3579ecb2f9dd190baec15d (patch) | |
tree | 0be4306ca538a5e1febe431c509ba2f79f784983 /java/com/android/dialer/main | |
parent | 2d87d76e2d4cde8279d08ca78c910ff0510f8f51 (diff) |
Improved handling of IS_READ in new call log.
It is not marked "not null" in the system call log and our simulator gives it null data, so handle it more gracefully to be on the safe side.
Also enforce "not null" for IS_READ and NEW in annotated call log as I observed that happening somehow (possibly from older builds though).
TEST=existing
Test: existing
PiperOrigin-RevId: 193271095
Change-Id: I780db20c9d6ea5cf5e1d757def9ea06b492267c1
Diffstat (limited to 'java/com/android/dialer/main')
-rw-r--r-- | java/com/android/dialer/main/impl/bottomnav/MissedCallCountObserver.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/com/android/dialer/main/impl/bottomnav/MissedCallCountObserver.java b/java/com/android/dialer/main/impl/bottomnav/MissedCallCountObserver.java index 276063474..ee7f6d006 100644 --- a/java/com/android/dialer/main/impl/bottomnav/MissedCallCountObserver.java +++ b/java/com/android/dialer/main/impl/bottomnav/MissedCallCountObserver.java @@ -62,7 +62,13 @@ public final class MissedCallCountObserver extends ContentObserver { .query( Calls.CONTENT_URI, new String[] {Calls._ID}, - Calls.IS_READ + " = ? AND " + Calls.TYPE + " = ?", + "(" + + Calls.IS_READ + + " = ? OR " + + Calls.IS_READ + + " IS NULL) AND " + + Calls.TYPE + + " = ?", new String[] {"0", Integer.toString(Calls.MISSED_TYPE)}, /* sortOrder= */ null)) { return cursor == null ? 0 : cursor.getCount(); |