From 4e278a7e656d529bd202688773a729d5448f7265 Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski Date: Fri, 3 Apr 2020 12:48:08 +0200 Subject: [PATCH] Handle SecurityException in CustomTabHelper --- .../java/org/odk/collect/android/utilities/CustomTabHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collect_app/src/main/java/org/odk/collect/android/utilities/CustomTabHelper.java b/collect_app/src/main/java/org/odk/collect/android/utilities/CustomTabHelper.java index 707e41e586d..873280a9286 100644 --- a/collect_app/src/main/java/org/odk/collect/android/utilities/CustomTabHelper.java +++ b/collect_app/src/main/java/org/odk/collect/android/utilities/CustomTabHelper.java @@ -101,7 +101,7 @@ public void openUri(Context context, Uri uri) { try { //open in external browser context.startActivity(new Intent(Intent.ACTION_VIEW, uri)); - } catch (ActivityNotFoundException e) { + } catch (ActivityNotFoundException | SecurityException e) { //open in webview Intent intent = new Intent(context, WebViewActivity.class); intent.putExtra(OPEN_URL, uri.toString());