mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
@@ -189,7 +189,7 @@ public class Helper {
|
||||
if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme()))
|
||||
view(context, intent.getData(), false);
|
||||
else
|
||||
startActivity(context, intent);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
static void view(Context context, Uri uri, boolean browse) {
|
||||
@@ -197,7 +197,7 @@ public class Helper {
|
||||
|
||||
if (browse || !hasCustomTabs(context, uri)) {
|
||||
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
||||
startActivity(context, getChooser(context, view));
|
||||
context.startActivity(getChooser(context, view));
|
||||
} else {
|
||||
// https://developer.chrome.com/multidevice/android/customtabs
|
||||
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
|
||||
@@ -250,17 +250,6 @@ public class Helper {
|
||||
return new Intent(Intent.ACTION_VIEW, Uri.parse(XDA_URI));
|
||||
}
|
||||
|
||||
static void startActivity(Context context, Intent intent) {
|
||||
try {
|
||||
if (Helper.hasAuthentication(context))
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||
context.startActivity(intent);
|
||||
} catch (ActivityNotFoundException ex) {
|
||||
Log.e(ex);
|
||||
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
// Graphics
|
||||
|
||||
static int dp2pixels(Context context, int dp) {
|
||||
@@ -506,10 +495,9 @@ public class Helper {
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Long id) {
|
||||
Helper.startActivity(context,
|
||||
new Intent(context, ActivityCompose.class)
|
||||
.putExtra("action", "edit")
|
||||
.putExtra("id", id));
|
||||
context.startActivity(new Intent(context, ActivityCompose.class)
|
||||
.putExtra("action", "edit")
|
||||
.putExtra("id", id));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -837,7 +825,7 @@ public class Helper {
|
||||
tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Helper.startActivity(tv.getContext(), new Intent(tv.getContext(), ActivityBilling.class));
|
||||
tv.getContext().startActivity(new Intent(tv.getContext(), ActivityBilling.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user