Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent
Version: 4a2ff9b6 (F-Droid release artifact)
With default settings, opening the app and pressing the Click to enable button makes the app crash. Log from logcat:
06-01 08:42:25.989 7971 7971 E AndroidRuntime: FATAL EXCEPTION: main
06-01 08:42:25.989 7971 7971 E AndroidRuntime: Process: com.frostnerd.smokescreen, PID: 7971
06-01 08:42:25.989 7971 7971 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.frostnerd.smokescreen.service.DnsVpnService: java.lang.IllegalArgumentException: com.frostnerd.smokescreen: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
06-01 08:42:25.989 7971 7971 E AndroidRuntime: 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.
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4567)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.ActivityThread.access$1700(ActivityThread.java:256)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2110)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7870)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: com.frostnerd.smokescreen: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
06-01 08:42:25.989 7971 7971 E AndroidRuntime: 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.
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.PendingIntent.getActivity(PendingIntent.java:444)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.PendingIntent.getActivity(PendingIntent.java:408)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at com.frostnerd.smokescreen.service.DnsVpnService.c(SourceFile:38)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at com.frostnerd.smokescreen.service.DnsVpnService.onCreate(SourceFile:39)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4554)
06-01 08:42:25.989 7971 7971 E AndroidRuntime: ... 9 more
Version 2.1.1-adblock
from the F-Droid repository does not have this issue.
Phone: OnePlus 9 Pro
OS: LineageOS 19-20220531-NIGHTLY-lemonadep
Edited by Zach Hoffman