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

Pending Intent can have one of FLAG_IMMUTABLE or FLAG_MUTABLE #786

Closed
usmanabid09 opened this issue Mar 21, 2022 · 1 comment
Closed

Pending Intent can have one of FLAG_IMMUTABLE or FLAG_MUTABLE #786

usmanabid09 opened this issue Mar 21, 2022 · 1 comment

Comments

@usmanabid09
Copy link

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.

@cortinico
Copy link
Member

We already do have this support:

private fun immutableFlag() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
PendingIntent.FLAG_IMMUTABLE
} else {
0
}

It was done in this PR:

This issue was closed.
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