-
Notifications
You must be signed in to change notification settings - Fork 582
Fix StrictMode unsafe intent launch violation #2330
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
Conversation
Could you provide more details on what the issue is? I don't see any warnings/lint issues in this area in Android Studio, but it sounds like you've seen a warning using some StrictMode. |
Hi @tonihei , in debug builds of my app I enabled the built-in platform feature StrictMode with the VmPolicy set to (among others) detect unsafe intent launches: One such issue detected by StrictMode is that when starting playback with a wired headset's play button using media resumption, the MediaButtonRetriever takes the recieved Intent, modifies it and sends it again. According to the docs, this is a possible security problem: And fixing this will allow me to remove the exemption of this detection from penaltyDeath and hence detect other programming mistakes that might be a real issue. |
Hi @tonihei, do you need any further information to proceed here? |
@tonihei sorry for the ping, could you please take a look? |
Sorry for the delay! I checked the pull request and it seems to work well to prevent the warning but also doesn't seem to remove any functionality from the incoming Intent. I'm going to import the PR now. |
Thank you! |
PiperOrigin-RevId: 777492666 (cherry picked from commit e807fe5)
No description provided.