Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 12 FLAG_IMMUTABLE #49

Closed
XMitja opened this issue Dec 1, 2021 · 2 comments
Closed

Android 12 FLAG_IMMUTABLE #49

XMitja opened this issue Dec 1, 2021 · 2 comments

Comments

@XMitja
Copy link

XMitja commented Dec 1, 2021

FLAG_IMMUTABLE is missing for PendingIntent in UpgradeNotification.java:

E/AndroidRuntime(11658): java.lang.RuntimeException: Error receiving broadcast Intent { act=com.example.r_upgrade.DOWNLOAD_STATUS flg=0x10 (has extras) } in com.example.r_upgrade.common.UpgradeManager$3@7fc8eed
E/AndroidRuntime(11658): at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1689)
E/AndroidRuntime(11658): at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run(Unknown Source:2)
E/AndroidRuntime(11658): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(11658): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(11658): at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime(11658): at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime(11658): at android.app.ActivityThread.main(ActivityThread.java:7838)
E/AndroidRuntime(11658): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11658): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime(11658): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/AndroidRuntime(11658): Caused by: java.lang.IllegalArgumentException: [...]: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

@XMitja XMitja changed the title Android 12 Android 12 FLAG_IMMUTABLE Dec 1, 2021
@rhymelph
Copy link
Owner

rhymelph commented Dec 6, 2021

if you set android compile SDK version = 31 , will crash.

@rhymelph
Copy link
Owner

rhymelph commented Dec 6, 2021

upgrade packages version to 0.3.7 , this crash will be fixed

@rhymelph rhymelph closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants