Update ShortcutBadger

Fixes #6069
// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-01-21 10:06:49 -08:00
parent 235a8472d9
commit 86df150374
2 changed files with 4 additions and 6 deletions

View File

@@ -500,7 +500,8 @@ public class MessageNotifier {
private static void updateBadge(Context context, int count) {
try {
ShortcutBadger.setBadge(context.getApplicationContext(), count);
if (count == 0) ShortcutBadger.removeCount(context);
else ShortcutBadger.applyCount(context, count);
} catch (Throwable t) {
// NOTE :: I don't totally trust this thing, so I'm catching
// everything.