|
|
|
@ -945,26 +945,20 @@ public class Helper {
|
|
|
|
|
if (task)
|
|
|
|
|
view.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
|
|
|
|
|
if ("chooser".equals(open_with_pkg)) {
|
|
|
|
|
if ("chooser".equals(open_with_pkg) && !open_with_tabs) {
|
|
|
|
|
try {
|
|
|
|
|
if (open_with_tabs) {
|
|
|
|
|
EntityLog.log(context, "Launching direct uri=" + uri +
|
|
|
|
|
" intent=" + view +
|
|
|
|
|
" extras=" + TextUtils.join(", ", Log.getExtras(view.getExtras())));
|
|
|
|
|
context.startActivity(view);
|
|
|
|
|
} else {
|
|
|
|
|
EntityLog.log(context, "Launching chooser uri=" + uri +
|
|
|
|
|
" intent=" + view +
|
|
|
|
|
" extras=" + TextUtils.join(", ", Log.getExtras(view.getExtras())));
|
|
|
|
|
Intent chooser = Intent.createChooser(view, context.getString(R.string.title_select_app));
|
|
|
|
|
context.startActivity(chooser);
|
|
|
|
|
}
|
|
|
|
|
} catch (ActivityNotFoundException ex) {
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
reportNoViewer(context, uri, ex);
|
|
|
|
|
}
|
|
|
|
|
} else if (browse || !open_with_tabs) {
|
|
|
|
|
try {
|
|
|
|
|
if (!"chooser".equals(open_with_pkg))
|
|
|
|
|
view.setPackage(open_with_pkg);
|
|
|
|
|
EntityLog.log(context, "Launching view uri=" + uri +
|
|
|
|
|
" intent=" + view +
|
|
|
|
@ -1015,6 +1009,7 @@ public class Helper {
|
|
|
|
|
|
|
|
|
|
CustomTabsIntent customTabsIntent = builder.build();
|
|
|
|
|
customTabsIntent.intent.putExtra(Browser.EXTRA_HEADERS, headers);
|
|
|
|
|
if (!"chooser".equals(open_with_pkg))
|
|
|
|
|
customTabsIntent.intent.setPackage(open_with_pkg);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|