mozilla-b2g/gaia — pull request #14648 by lissyx (2013-12-13 12:32:05+00:00)
Title: Bug 910999 - Correct display and removal of voicemail notification

In bug 910999 we want to make sure that the voicemail notification is
not removed upon tap of the user but when the message has actually been
listened to. The process for voicemail is that when you have new
messages, carrier sends a SMS with specific bits stating the current
status of your voicemail:
- whether you have messages, i.e. should the voicemail indicator be
turned on ;
- how much messages you have (this is optional, -1 is valid, 0 happens
when you have no more message) ;
- a return number to call and a text message ;
So when you have voicemail messages waiting for you, you get a sms with
the active bit set to 1. We get this messag from Gecko through the
statuschanged event, and the active status is read from the hasMessages
property. When this is true, we send a notification. When this is true
we remove the notification.

Removal was not possible until the new Notification API is available. So
now that it is available, we make use of it. We have to enhance the
notification handler of the system app, however, to disable the hacks
that we have implemented for the old API. This might be part of bug
890440.