[BUG]: Play Console warns about unspecified mutability in PendingIntents #5442
Description
Describe the bug
When pushing the latest release to Play Console, it provided warnings about:
Apps targeting Android 12 or later must specify the mutability of PendingIntents with either FLAG_IMMUTABLE or FLAG_MUTABLE. Having unspecified mutability may cause your app to crash.
And it links to https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability. We don't use PendingIntent
s directly, so this is related to dependencies. The ones detected by Play Console are (obfuscated for the latest release):
- androidx.work.impl.background.systemalarm.a.a
- bs.dL.u
- bn.dL.u
- com.google.android.gms.measurement.internal.et.u
Unfortunately, none of these seem to be part of our codebase (at least from what I could see in our proguard.map file, so they're probably coming from GMS if I was to guess (I can't be positive).
Steps To Reproduce
N/A, though I think there might be a way to check for this using Android lint (needs more research) from looking briefly at https://stackoverflow.com/q/67045607/3689782.
Expected Behavior
We should avoid this warning by ensuring our app is Android 31 compliant.
Screenshots/Videos
No response
What device/emulator are you using?
N/A
Which Android version is your device/emulator running?
All
Which version of the Oppia Android app are you using?
0.13-beta-dcde7b359e
Additional Context
Note that Play Console warns about potential crashes, but I'm fairly certain the app never hits these scenarios. However, more testing will be needed on a newer version of Android just to be sure.
This probably ultimately requires isolating and then updating the corresponding dependencies. Updating dependencies is a difficult problem for us without more significant e2e testing, and it almost certainly will cause compatibility issues with Gradle.