mirror of
https://github.com/home-assistant/android
synced 2024-07-22 10:54:12 +00:00
Catch errors when intent URI is not valid (#3799)
This commit is contained in:
parent
8d3c2609fe
commit
477c299272
|
@ -1489,7 +1489,12 @@ class MessagingManager @Inject constructor(
|
|||
context.packageManager.getLaunchIntentForPackage(uri.substringAfter(APP_PREFIX))
|
||||
}
|
||||
uri.startsWith(INTENT_PREFIX) -> {
|
||||
Intent.parseUri(uri, Intent.URI_INTENT_SCHEME)
|
||||
try {
|
||||
Intent.parseUri(uri, Intent.URI_INTENT_SCHEME)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Unable to parse intent URI", e)
|
||||
null
|
||||
}
|
||||
}
|
||||
uri.startsWith(SETTINGS_PREFIX) -> {
|
||||
if (uri.substringAfter(SETTINGS_PREFIX) == NOTIFICATION_HISTORY) {
|
||||
|
|
Loading…
Reference in a new issue