mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Prevent crash
This commit is contained in:
parent
b317d64377
commit
eafdaee090
1 changed files with 7 additions and 2 deletions
|
@ -456,8 +456,13 @@ public class Helper {
|
|||
Log.i("View=" + uri);
|
||||
|
||||
if (browse || !hasCustomTabs(context, uri)) {
|
||||
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
||||
context.startActivity(getChooser(context, view));
|
||||
try {
|
||||
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
||||
context.startActivity(getChooser(context, view));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
// https://developer.chrome.com/multidevice/android/customtabs
|
||||
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
||||
|
|
Loading…
Reference in a new issue