Skip chooser on open link

This commit is contained in:
M66B 2020-07-21 22:40:37 +02:00
parent dc6cab7edb
commit 4e0ed9ee61
1 changed files with 4 additions and 1 deletions

View File

@ -528,7 +528,10 @@ public class Helper {
Intent view = new Intent(Intent.ACTION_VIEW, uri);
if (task)
view.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(getChooser(context, view));
context.startActivity(view);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri), Toast.LENGTH_LONG).show();
} catch (Throwable ex) {
Log.e(ex);
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();