distriqt / ANE-AndroidSupport

Android Support Library Native Extension
https://airnativeextensions.com
22 stars 4 forks source link

Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable #17

Closed bobrokrol closed 2 years ago

bobrokrol commented 2 years ago

Also drammatic jump in crashes last days as there was sceduled update to android 12

Environment
Logs

02-07 05:05:12.330 4713 4737 E AndroidRuntime: FATAL EXCEPTION: pool-5-thread-1 02-07 05:05:12.330 4713 4737 E AndroidRuntime: Process: my.app.id, PID: 4713 02-07 05:05:12.330 4713 4737 E AndroidRuntime: java.lang.IllegalArgumentException: my.app.id: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 02-07 05:05:12.330 4713 4737 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. 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at android.app.PendingIntent.checkFlags(PendingIntent.java:382) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at android.app.PendingIntent.getBroadcast(PendingIntent.java:660) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:273) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:151) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:171) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 02-07 05:05:12.330 4713 4737 E AndroidRuntime: at java.lang.Thread.run(Thread.java:920)

marchbold commented 2 years ago

This should be resolved in the latest release.