From e44ec21e2c6510ab66a7c59432a295e925a422f1 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 14 Oct 2019 09:11:17 +0200 Subject: [PATCH] Finish early when biometrics required --- .../main/java/eu/faircode/email/ActivityBase.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 6ed5bc04c1..f7b073bbbb 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -105,6 +105,13 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc prefs.registerOnSharedPreferenceChangeListener(this); + if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) { + finish(); + startActivity( + new Intent(this, ActivityMain.class) + .putExtra("intent", intent)); + } + super.onCreate(savedInstanceState); } @@ -134,12 +141,6 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc Log.i("Contacts permission=" + contacts); finish(); startActivity(getIntent()); - } else if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) { - Intent intent = getIntent(); - finish(); - startActivity( - new Intent(this, ActivityMain.class) - .putExtra("intent", intent)); } super.onResume();