add some logging for QuickUnlock issue detection

This commit is contained in:
Philipp Crocoll 2016-12-06 02:37:21 +01:00
parent 7378e19f99
commit a5bb280163
2 changed files with 4 additions and 0 deletions

View File

@ -1710,6 +1710,8 @@ namespace keepass2android
base.OnResume();
_activityDesign.ReapplyTheme();
Kp2aLog.Log("starting: " + _starting + ", Finishing: " + IsFinishing + ", _performingLoad: " + _performingLoad);
CheckBox cbOfflineMode = (CheckBox)FindViewById(Resource.Id.work_offline);
App.Kp2a.OfflineMode = cbOfflineMode.Checked = App.Kp2a.OfflineModePreference; //this won't overwrite new user settings because every change is directly saved in settings
LinearLayout offlineModeContainer = FindViewById<LinearLayout>(Resource.Id.work_offline_container);

View File

@ -302,10 +302,12 @@ namespace keepass2android
var expectedPasswordPart = ExpectedPasswordPart;
if (pwd.Text == expectedPasswordPart)
{
Kp2aLog.Log("QuickUnlock successful!");
App.Kp2a.UnlockDatabase();
}
else
{
Kp2aLog.Log("QuickUnlock not successful!");
App.Kp2a.LockDatabase(false);
Toast.MakeText(this, GetString(Resource.String.QuickUnlock_fail), ToastLength.Long).Show();
}