From 21b66b165aba141421c885684d99a5e807683e00 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 11 Jul 2019 17:54:52 +0200 Subject: [PATCH] Finish on screen off when using biometrics authentication --- app/src/main/java/eu/faircode/email/ActivityBase.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 1a96a53425..c563de3749 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -147,7 +147,12 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc if (pm != null && !pm.isInteractive()) { Log.i("Stop with screen off"); - Helper.clearAuthentication(this); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + boolean biometrics = prefs.getBoolean("biometrics", false); + if (biometrics) { + Helper.clearAuthentication(this); + finish(); + } } }