Badger logging

This commit is contained in:
M66B
2023-06-16 17:06:23 +02:00
parent 38ca55c49b
commit 2fb2e054db
4 changed files with 266 additions and 6 deletions

View File

@@ -109,7 +109,7 @@ import javax.mail.event.MessageCountEvent;
import javax.mail.event.StoreEvent;
import javax.mail.event.StoreListener;
import me.leolin.shortcutbadger.ShortcutBadger;
import me.leolin.shortcutbadger.ShortcutBadgerAlt;
public class ServiceSynchronize extends ServiceBase implements SharedPreferences.OnSharedPreferenceChangeListener {
private Network lastActive = null;
@@ -938,9 +938,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
// Update badge
try {
if (count == 0 || !badge)
ShortcutBadger.removeCount(ServiceSynchronize.this);
ShortcutBadgerAlt.removeCount(ServiceSynchronize.this);
else
ShortcutBadger.applyCount(ServiceSynchronize.this, count);
ShortcutBadgerAlt.applyCount(ServiceSynchronize.this, count);
} catch (Throwable ex) {
Log.e(ex);
}