trojan-gfw / igniter

A trojan client for Android (UNDER CONSTRUCTION).
GNU General Public License v3.0
3.3k stars 736 forks source link

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. #439

Open mablue opened 7 months ago

mablue commented 7 months ago

https://paste.crdroid.net/tGrdYI

time: 1713589457907
msg: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
stacktrace: java.lang.RuntimeException: Unable to start service io.github.trojan_gfw.igniter.ProxyService@4d866f4 with Intent { cmp=io.github.trojan_gfw.igniter.debug/io.github.trojan_gfw.igniter.ProxyService }: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4880)
    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2314)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8244)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.PendingIntent.checkPendingIntent(PendingIntent.java:450)
    at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:566)
    at android.app.PendingIntent.getActivity(PendingIntent.java:552)
    at android.app.PendingIntent.getActivity(PendingIntent.java:516)
    at io.github.trojan_gfw.igniter.ProxyService.startForegroundNotification(ProxyService.java:276)
    at io.github.trojan_gfw.igniter.ProxyService.onStartCommand(ProxyService.java:354)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4862)
    ... 9 more