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

Catch FileUriExposedExceptions when starting view intents #308

Merged
merged 2 commits into from Dec 20, 2016

Conversation

ianhanniballake
Copy link
Collaborator

With Muzei targeting API 24 now, we cannot use startActivity with Intents that include file:// URIs. Unfortunately, at least one extension sends such view intents. We now catch those errors.

Unfortunately due to verify errors, you can't catch a FileUriExposedException directly prior to API 24, so we instead catch any RuntimeException that comes from starting the activity. This covers the previously caught ActivityNotFoundException and SecurityException as well as FileUriExposedExceptions.
@ianhanniballake ianhanniballake merged commit 07883f7 into muzei:master Dec 20, 2016
@ianhanniballake ianhanniballake deleted the fix_beta5 branch December 20, 2016 18:50
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

Successfully merging this pull request may close these issues.

None yet

1 participant