From 3cb9ebb7c859ab9e6ae007aa22b2dd1439a73406 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 16 Jun 2023 16:41:00 +0200 Subject: [PATCH] Revert "Debug: badger" This reverts commit 7e762d0deb31986453f726761e577ca3271b96c1. --- app/src/main/java/eu/faircode/email/EntityLog.java | 2 +- .../me/leolin/shortcutbadger/ShortcutBadger.java | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityLog.java b/app/src/main/java/eu/faircode/email/EntityLog.java index 1228b21198..304fb95dd3 100644 --- a/app/src/main/java/eu/faircode/email/EntityLog.java +++ b/app/src/main/java/eu/faircode/email/EntityLog.java @@ -67,7 +67,7 @@ public class EntityLog { public enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules, Cloud, Debug} - public static void log(final Context context, String data) { + static void log(final Context context, String data) { log(context, Type.General, data); } diff --git a/app/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java b/app/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java index 77a7bd18a7..d51419a2e4 100644 --- a/app/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java +++ b/app/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java @@ -78,12 +78,8 @@ public final class ShortcutBadger { public static boolean applyCount(Context context, int badgeCount) { try { applyCountOrThrow(context, badgeCount); - eu.faircode.email.EntityLog.log(context, "Applied badge count=" + badgeCount + - " badger=" + sShortcutBadger.getClass()); return true; } catch (ShortcutBadgeException e) { - eu.faircode.email.EntityLog.log(context, "badger=" + sShortcutBadger.getClass() + "\n" + - e + "\n" + Log.getStackTraceString(e)); if (Log.isLoggable(LOG_TAG, Log.DEBUG)) { Log.d(LOG_TAG, "Unable to execute badge", e); } @@ -214,10 +210,6 @@ public final class ShortcutBadger { ResolveInfo resolveInfoDefault = context.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); validateInfoList(resolveInfoDefault, resolveInfos); - for (ResolveInfo ri : resolveInfos) - eu.faircode.email.EntityLog.log(context, "Badger pkg=" + ri.activityInfo.packageName + - (ri.activityInfo.packageName.equals(resolveInfoDefault.activityInfo.packageName) ? "*" : "")); - for (ResolveInfo resolveInfo : resolveInfos) { String currentHomePackage = resolveInfo.activityInfo.packageName; @@ -239,9 +231,6 @@ public final class ShortcutBadger { } } - eu.faircode.email.EntityLog.log(context, "Selected badger=" + - (sShortcutBadger == null ? null : sShortcutBadger.getClass())); - if (sShortcutBadger == null) { if (Build.MANUFACTURER.equalsIgnoreCase("ZUK")) sShortcutBadger = new ZukHomeBadger(); @@ -255,8 +244,6 @@ public final class ShortcutBadger { sShortcutBadger = new DefaultBadger(); } - eu.faircode.email.EntityLog.log(context, "Using badger=" + sShortcutBadger.getClass()); - return true; }