Skip to content
Snippets Groups Projects
Commit 093d9b6f authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

App start: catch SecurityException

(cherry picked from commit d180d748)
parent ca8cc43a
No related branches found
No related tags found
No related merge requests found
......@@ -196,9 +196,13 @@ class StartActivity : FragmentActivity() {
}
private fun startPlaybackFromApp(intent: Intent) {
if (intent.type?.startsWith("video") == true)
startActivity(intent.setClass(this, VideoPlayerActivity::class.java))
else
if (intent.type?.startsWith("video") == true) {
try {
startActivity(intent.setClass(this, VideoPlayerActivity::class.java))
} catch (ex: SecurityException) {
intent.data.let { MediaUtils.openMediaNoUi(it) }
}
} else
intent.data.let { MediaUtils.openMediaNoUi(it) }
finish()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment