mozilla-b2g/gaia — pull request #9207 by janjongboom (2013-04-16 13:27:07+00:00)
Title: Bug 858908 - Class 0 SMSes get cleared when opening SMS app

Fix for [#858908](https://bugzilla.mozilla.org/show_bug.cgi?id=858908). The problem lies herein:

1. Class 0 SMSes are handled by the SMS app. When the SMS app encounters a class 0 sms it shows a notification.
2. When clicking a notification the respective application will launch
3. All notifications for this application will be removed
4. If you had two class 0 SMSes, or one in notifications that you didn't read yet, it will be purged, because these SMSes don't show up in the SMS app (on purpose).

This patch introduces a way for notifications to avoid getting cleared when opening their parent application. The behaviour when clicking the notification (goes away) or 'clear all' is not affected.

So I took maybe a bit of an unusual approach, but that's because I didn't want to touch Gecko on this part (and change the API of mozNotification), probably mainly because this is a FFOS only problem so far. If you prefix the title line of the notification with a zero width space it will become a 'persistent' notification.

The reason for this is that it doesn't matter if a bug is introduced here, because the character will never be shown. In theory it could cause problems if you create people in your contacts that have a name that starts with a zero width space, but a la.