Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Updating target SDK to 31+ for apps causes a crash with media notifications #11563

Closed
jonalmeida opened this issue Jan 17, 2022 · 2 comments
Closed
Assignees
Labels
💥 crash 🎭 Focus Requirements for Focus/Klar <media> Component: feature-media 🌐 reference browser Features, bugs, issues related to the reference browser implementation

Comments

@jonalmeida
Copy link
Contributor

jonalmeida commented Jan 17, 2022

This was seen in R-B and Focus.

    java.lang.IllegalArgumentException: org.mozilla.reference.browser: 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.buildServicePendingIntent(PendingIntent.java:724)
        at android.app.PendingIntent.getService(PendingIntent.java:686)
        at mozilla.components.feature.media.notification.MediaNotificationKt.toNotificationData(MediaNotification.kt:105)
        at mozilla.components.feature.media.notification.MediaNotificationKt.access$toNotificationData(MediaNotification.kt:1)
        at mozilla.components.feature.media.notification.MediaNotificationKt$toNotificationData$1.invokeSuspend(Unknown Source:13)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

┆Issue is synchronized with this Jira Task

@jonalmeida jonalmeida added 🎭 Focus Requirements for Focus/Klar 🌐 reference browser Features, bugs, issues related to the reference browser implementation <media> Component: feature-media 💥 crash labels Jan 17, 2022
@jonalmeida
Copy link
Contributor Author

In Fenix, the fix is a bit confusing to me: mozilla-mobile/fenix#23080

I'm not sure how it evades the need for making the PendingIntent mutable.

@jonalmeida
Copy link
Contributor Author

jonalmeida commented Jan 19, 2022

In Fenix, the fix is a bit confusing to me: mozilla-mobile/fenix#23080

I'm not sure how it evades the need for making the PendingIntent mutable.

I tried upgrading WM in AC to see if fixed the R-B crashes - it did not for me.

Focus worked with Ionut's patch here: mozilla-mobile/focus-android#6247

JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💥 crash 🎭 Focus Requirements for Focus/Klar <media> Component: feature-media 🌐 reference browser Features, bugs, issues related to the reference browser implementation
Projects
None yet
Development

No branches or pull requests

1 participant