From 95d2a7219966bbba0e8a072ec0414df56cc581f9 Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Mon, 8 May 2017 11:28:06 +0200 Subject: [PATCH] fix for unnecessary clearing of fingerprint unlock data --- src/keepass2android/QuickUnlock.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs index ee5c789e..70ce0e03 100644 --- a/src/keepass2android/QuickUnlock.cs +++ b/src/keepass2android/QuickUnlock.cs @@ -176,9 +176,16 @@ namespace keepass2android }; _fingerprintPermissionGranted = true; Kp2aLog.Log("_fingerprintPermissionGranted"); + if (_onResumeDone) + { + //it seems the permission result is called after onResume sometimes. Repeat fingerprint unlock then. + InitFingerprintUnlock(); + } } } + bool _onResumeDone = false; + public void OnFingerprintError(string message) { Kp2aLog.Log("fingerprint error: " + message); @@ -274,7 +281,6 @@ namespace keepass2android btn.Tag = GetString(Resource.String.fingerprint_unlock_failed); _fingerprintIdentifier = null; - ClearFingerprintUnlockData(); } } catch (Exception e) @@ -350,7 +356,8 @@ namespace keepass2android else keyboard.HideSoftInputFromWindow(pwd.WindowToken, HideSoftInputFlags.ImplicitOnly); }, 50); - + + _onResumeDone = true;