Prevent crash

pull/178/head
M66B 5 years ago
parent b317d64377
commit eafdaee090

@ -456,8 +456,13 @@ public class Helper {
Log.i("View=" + uri); Log.i("View=" + uri);
if (browse || !hasCustomTabs(context, uri)) { if (browse || !hasCustomTabs(context, uri)) {
try {
Intent view = new Intent(Intent.ACTION_VIEW, uri); Intent view = new Intent(Intent.ACTION_VIEW, uri);
context.startActivity(getChooser(context, view)); context.startActivity(getChooser(context, view));
} catch (Throwable ex) {
Log.e(ex);
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
}
} else { } else {
// https://developer.chrome.com/multidevice/android/customtabs // https://developer.chrome.com/multidevice/android/customtabs
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();

Loading…
Cancel
Save