diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 04a38b97..84c44f6a 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -1976,8 +1976,15 @@ namespace keepass2android } catch (Exception e) { + //exception can happen here if the app was restored from Google Backup (including preferences) but no fingerprint data is there. btn.SetImageResource(Resource.Drawable.ic_fingerprint_error); - btn.Tag = "Error initializing Fingerprint Unlock: " + e; + Kp2aLog.Log("failed to init fingerprint unlock:" + e.ToString()); + string error = GetString(Resource.String.FingerprintInitFailed) + " " + + GetString(Resource.String.fingerprint_reenable2); + + btn.Tag = error; + + Toast.MakeText(this, Resource.String.fingerprint_reenable2, ToastLength.Long).Show(); _fingerprintDec = null; return false; @@ -1991,7 +1998,7 @@ namespace keepass2android var btn = FindViewById(Resource.Id.fingerprintbtn); //key invalidated permanently btn.SetImageResource(Resource.Drawable.ic_fingerprint_error); - btn.Tag = GetString(Resource.String.fingerprint_unlock_failed); + btn.Tag = GetString(Resource.String.fingerprint_unlock_failed) + " " + GetString(Resource.String.fingerprint_reenable2); _fingerprintDec = null; ClearFingerprintUnlockData(); @@ -2122,7 +2129,7 @@ namespace keepass2android _act.ClearFingerprintUnlockData(); _act.InitFingerprintUnlock(); - Message = _act.GetString(Resource.String.fingerprint_disabled_wrong_masterkey); + Message = _act.GetString(Resource.String.fingerprint_disabled_wrong_masterkey) + " " + _act.GetString(Resource.String.fingerprint_reenable2); } else { diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs index b2ce30ea..45000438 100644 --- a/src/keepass2android/QuickUnlock.cs +++ b/src/keepass2android/QuickUnlock.cs @@ -305,8 +305,8 @@ namespace keepass2android var btn = FindViewById(Resource.Id.fingerprintbtn); //key invalidated permanently btn.SetImageResource(Resource.Drawable.ic_fingerprint_error); - btn.Tag = GetString(Resource.String.fingerprint_unlock_failed); - _fingerprintIdentifier = null; + btn.Tag = GetString(Resource.String.fingerprint_unlock_failed) + " " + GetString(Resource.String.fingerprint_reenable2); + _fingerprintIdentifier = null; } private void ClearFingerprintUnlockData() diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml index e0b6fb9b..4300cd26 100644 --- a/src/keepass2android/Resources/values/strings.xml +++ b/src/keepass2android/Resources/values/strings.xml @@ -95,9 +95,12 @@ Enable full Fingerprint Unlock Enable Fingerprint Unlock for QuickUnlock Touch sensor to unlock database - Fingerprint Unlock failed. Decryption key was invalidated by Android OS. This usually happens if a new fingerprint was enrolled or security settings were changed. Please unlock with your password and then re-enabled Fingerprint Unlock in the database settings. - Unlocking the database failed: Invalid composite key. Fingerprint Unlock was disabled because apparently the stored master password is no longer valid. Please unlock with your password and then re-enabled Fingerprint Unlock in the database settings. + Fingerprint Unlock failed. Decryption key was invalidated by Android OS. This usually happens if a new fingerprint was enrolled or security settings were changed. + Unlocking the database failed: Invalid composite key. Fingerprint Unlock was disabled because apparently the stored master password is no longer valid. Please re-enable Fingerprint Unlock for the new master password. + Please unlock with your password and then re-enable Fingerprint Unlock in the database settings. + Failed to initialize fingerprint sensor. + This will store your master password on this device, encrypted with the Android Keystore and protected using fingerprint authentication. Allows to unlock your database only with your fingerprint. Allows to use fingerprint authentication instead of the QuickUnlock code. Does not store any information related to your master password.