From 1d9c0d4988d432bc8bb42bf35d6ee1362924ca3a Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 30 May 2020 16:21:25 +0200 Subject: [PATCH] Cancel biometric prompt on destroy --- app/src/main/java/eu/faircode/email/Helper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index c561fc686e..112bfc8c05 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -1141,8 +1141,8 @@ public class Helper { prompt.authenticate(info.build()); owner.getLifecycle().addObserver(new LifecycleObserver() { - @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) - public void onPause() { + @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) + public void onDestroy() { prompt.cancelAuthentication(); handler.post(cancelled); owner.getLifecycle().removeObserver(this);