mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Badger logging
This commit is contained in:
@@ -135,7 +135,7 @@ import javax.mail.search.ReceivedDateTerm;
|
||||
import javax.mail.search.SearchTerm;
|
||||
import javax.mail.search.SentDateTerm;
|
||||
|
||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
import me.leolin.shortcutbadger.ShortcutBadgerAlt;
|
||||
|
||||
class Core {
|
||||
static final int DEFAULT_CHUNK_SIZE = 50;
|
||||
@@ -5453,7 +5453,7 @@ class Core {
|
||||
nm.notify(tag, NotificationHelper.NOTIFICATION_TAGGED, notification);
|
||||
// https://github.com/leolin310148/ShortcutBadger/wiki/Xiaomi-Device-Support
|
||||
if (id == 0 && badge && Helper.isXiaomi())
|
||||
ShortcutBadger.applyNotification(context, notification, current);
|
||||
ShortcutBadgerAlt.applyNotification(context, notification, current);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class EntityLog {
|
||||
|
||||
public enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules, Cloud, Debug}
|
||||
|
||||
static void log(final Context context, String data) {
|
||||
public static void log(final Context context, String data) {
|
||||
log(context, Type.General, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user