From 1d873484f03a8b0895508d4086bdbcef6e3294e3 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Wed, 13 Jan 2021 15:40:03 +0800 Subject: [PATCH 1/3] add honor launcher package name. --- .../java/me/leolin/shortcutbadger/impl/HuaweiHomeBadger.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl/HuaweiHomeBadger.java b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl/HuaweiHomeBadger.java index c6952ef..c3cd3d2 100644 --- a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl/HuaweiHomeBadger.java +++ b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl/HuaweiHomeBadger.java @@ -28,7 +28,8 @@ public void executeBadge(Context context, ComponentName componentName, int badge @Override public List getSupportLaunchers() { return Arrays.asList( - "com.huawei.android.launcher" + "com.huawei.android.launcher", + "com.hihonor.android.launcher" ); } } From d4036bd4f0b7dcc34f89985d69c396bc30dc4602 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Sun, 7 Feb 2021 10:26:23 +0800 Subject: [PATCH 2/3] fix IndexOutOfBoundsException --- .../src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java index fa0ffa1..5265c24 100644 --- a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java +++ b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java @@ -262,6 +262,9 @@ private static boolean isLauncherVersionSupported(Context context, String curren * @param resolveInfos list of all Home activities in the system */ private static void validateInfoList(ResolveInfo defaultActivity, List resolveInfos) { + if (resolveInfos == null || resolveInfos.isEmpty()) { + return; + } int indexToSwapWith = 0; for (int i = 0, resolveInfosSize = resolveInfos.size(); i < resolveInfosSize; i++) { ResolveInfo resolveInfo = resolveInfos.get(i); From 479db17a60822252c6970f3351086fdc2576d6f9 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Mon, 17 May 2021 17:11:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?bugfix:=20=E9=BB=98=E8=AE=A4defaultActivity?= =?UTF-8?q?=20=E6=88=96=E8=80=85=E8=8E=B7=E5=8F=96=E5=88=B0=E7=9A=84resolv?= =?UTF-8?q?eInfo=E4=B8=BAnull=E6=98=AF=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../me/leolin/shortcutbadger/ShortcutBadger.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java index 5265c24..528edb7 100644 --- a/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java +++ b/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java @@ -265,9 +265,15 @@ private static void validateInfoList(ResolveInfo defaultActivity, List