Commit 87b7124
Fix crash when Hide App Icon is enabled alongside dynamic shortcuts
Fixes
```FATAL EXCEPTION: main
Process: com.github.metacubex.clash.meta, PID: 11066
java.lang.RuntimeException: Unable to create application com.github.kr328.clash.MainApplication
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8144)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2690)
at android.os.Handler.dispatchMessage(Handler.java:132)
at android.os.Looper.dispatchMessage(Looper.java:333)
at android.os.Looper.loopOnce(Looper.java:263)
at android.os.Looper.loop(Looper.java:367)
at android.app.ActivityThread.main(ActivityThread.java:9287)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:566)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.IllegalStateException: Launcher activity not found for package com.github.metacubex.clash.meta
at android.os.Parcel.createExceptionOrNull(Parcel.java:3381)
at android.os.Parcel.createException(Parcel.java:3357)
at android.os.Parcel.readException(Parcel.java:3340)
at android.os.Parcel.readException(Parcel.java:3282)
at android.content.pm.IShortcutService$Stub$Proxy.setDynamicShortcuts(IShortcutService.java:599)
at android.content.pm.ShortcutManager.setDynamicShortcuts(ShortcutManager.java:152)
at androidx.core.content.pm.ShortcutManagerCompat.setDynamicShortcuts(ShortcutManagerCompat.java:473)
at com.github.kr328.clash.MainApplication.setupShortcuts(MainApplication.kt:87)
at com.github.kr328.clash.MainApplication.onCreate(MainApplication.kt:39)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1396)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8139)
... 10 more
```1 parent afd1da5 commit 87b7124
2 files changed
Lines changed: 18 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | | - | |
| 82 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
0 commit comments