Revert "Always exclude from recents"

This reverts commit f7b1f3348a.
This commit is contained in:
M66B
2019-09-09 14:58:31 +02:00
parent f7b1f3348a
commit 93e20b7228
14 changed files with 64 additions and 62 deletions

View File

@@ -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));
}
});
}