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. #418

Open maweis1981 opened 2 years ago

maweis1981 commented 2 years ago

2022-06-18 12:27:03.294 11177-11177/? E/AndroidRuntime: FATAL EXCEPTION: main Process: io.github.trojan_gfw.igniter:proxy, PID: 11177 java.lang.RuntimeException: Unable to start service io.github.trojan_gfw.igniter.ProxyService@c2154b with Intent { cmp=io.github.trojan_gfw.igniter/.ProxyService }: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter: 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:4657) at android.app.ActivityThread.access$2000(ActivityThread.java:247) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) Caused by: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter: 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.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458) at android.app.PendingIntent.getActivity(PendingIntent.java:444) at android.app.PendingIntent.getActivity(PendingIntent.java:408) at io.github.trojan_gfw.igniter.ProxyService.onStartCommand(:3) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639) ... 9 more