Added no history option

This commit is contained in:
M66B
2019-10-05 14:52:40 +02:00
parent 40c93e6541
commit 2752f7435b
10 changed files with 185 additions and 35 deletions

View File

@@ -205,7 +205,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
public void startActivity(Intent intent) {
try {
if (Helper.hasAuthentication(this))
if (Helper.noHistory(this))
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
super.startActivity(intent);
} catch (ActivityNotFoundException ex) {
@@ -217,7 +217,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
public void startActivityForResult(Intent intent, int requestCode) {
try {
if (Helper.hasAuthentication(this))
if (Helper.noHistory(this))
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
super.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException ex) {