Fixed & simplified missed call & voicemail notifications.
Fixed how missed call and voicemail records are handled w.r.t.
notification and appearance in the "new" section.
The new section is meant to show calls that are not yet consumed. Till
now, for missed calls "new" flag has been used for two purposes -
(1) indication that the notification has to be shown and (2) unconsumed
call. However for voicemails the "new" flag only indicates
the notification state. The consumed state is indicated by the flag
"is_read".
Using the "new" flag with dual meaning causes problems when we want to
remove notification for voicemails. In order to remove voicemail
notification on entering the call log screen we need to mark the calls
as "old" but this means that missed calls immediately get moved to the
"old" section.
This change extends the usage of the "is_read" flag to missed call as
well. Now the "new" section simply includes calls that are not marked as
read and "old" section includes everythng else.
Missed calls are marked as read when the user leaves the call log
screen, whereas voicemails are marked as read when the user opens the
call details page.
Framework change to insert new missed calls with default unread state
is done in Id24f815994ce90c89f5907c919ce95043a5d6217.
bug: 5141185
Change-Id: Ieade142fb5acf5b295251ff1f73bf30d1860bae1
2 files changed