Add number of messages to the notification number attribute

Although not used by stock Android, many custom ROM's (and possibly OEM
versions?) have a setting to display the "number" count of a notification
overlayed on the status bar icon. Add support for this.

Closes #1637
pull/1/head
Veeti Paananen 10 years ago committed by Moxie Marlinspike
parent d1dd50e31c
commit 19ae5043cc

@ -172,6 +172,7 @@ public class MessageNotifier {
builder.setContentText(notifications.get(0).getText());
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
builder.setContentInfo(String.valueOf(notificationState.getMessageCount()));
builder.setNumber(notificationState.getMessageCount());
if (masterSecret != null) {
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_as_read),
@ -215,6 +216,7 @@ public class MessageNotifier {
builder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, RoutingActivity.class), 0));
builder.setContentInfo(String.valueOf(notificationState.getMessageCount()));
builder.setNumber(notificationState.getMessageCount());
if (masterSecret != null) {
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_all_as_read),

Loading…
Cancel
Save