|
|
@ -483,11 +483,17 @@ public class Helper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void view(Context context, Uri uri, boolean browse) {
|
|
|
|
static void view(Context context, Uri uri, boolean browse) {
|
|
|
|
|
|
|
|
view(context, uri, browse, false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void view(Context context, Uri uri, boolean browse, boolean task) {
|
|
|
|
Log.i("View=" + uri);
|
|
|
|
Log.i("View=" + uri);
|
|
|
|
|
|
|
|
|
|
|
|
if (browse || !hasCustomTabs(context, uri)) {
|
|
|
|
if (browse || !hasCustomTabs(context, uri)) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
|
|
|
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
|
|
|
|
|
|
|
if (task)
|
|
|
|
|
|
|
|
view.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
context.startActivity(getChooser(context, view));
|
|
|
|
context.startActivity(getChooser(context, view));
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|