mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-22 01:02:16 -05:00
EntryActivity.cs: Ensure notifications don't pop up if locked
QuickUnlock.cs: ensure keyboard shows up also OnResume App.cs: use GetDb() to ensure db is not null
This commit is contained in:
parent
85e6a0e9c2
commit
4f7744999f
@ -94,7 +94,7 @@ namespace keepass2android
|
||||
|
||||
Database db = App.Kp2a.GetDb();
|
||||
// Likely the app has been killed exit the activity
|
||||
if (! db.Loaded)
|
||||
if (!db.Loaded || (App.Kp2a.QuickLocked))
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
|
@ -65,15 +65,11 @@ namespace keepass2android
|
||||
|
||||
txtLabel.Text = GetString(Resource.String.QuickUnlock_label, new Java.Lang.Object[]{quickUnlockLength});
|
||||
|
||||
EditText pwd= (EditText)FindViewById(Resource.Id.QuickUnlock_password);
|
||||
pwd.SetEms(quickUnlockLength);
|
||||
pwd.PostDelayed(() => {
|
||||
InputMethodManager keyboard = (InputMethodManager)GetSystemService(Context.InputMethodService);
|
||||
keyboard.ShowSoftInput(pwd, 0);
|
||||
}, 50);
|
||||
|
||||
SetResult(KeePass.ExitChangeDb);
|
||||
|
||||
|
||||
EditText pwd = (EditText)FindViewById(Resource.Id.QuickUnlock_password);
|
||||
pwd.SetEms(quickUnlockLength);
|
||||
|
||||
Button btnUnlock = (Button)FindViewById(Resource.Id.QuickUnlock_button);
|
||||
btnUnlock.Click += (object sender, EventArgs e) =>
|
||||
{
|
||||
@ -110,6 +106,14 @@ namespace keepass2android
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
EditText pwd = (EditText)FindViewById(Resource.Id.QuickUnlock_password);
|
||||
pwd.PostDelayed(() =>
|
||||
{
|
||||
InputMethodManager keyboard = (InputMethodManager)GetSystemService(Context.InputMethodService);
|
||||
keyboard.ShowSoftInput(pwd, 0);
|
||||
}, 50);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace keepass2android
|
||||
{
|
||||
public void LockDatabase(bool allowQuickUnlock = true)
|
||||
{
|
||||
if (_db.Loaded)
|
||||
if (GetDb().Loaded)
|
||||
{
|
||||
if (QuickUnlockEnabled && allowQuickUnlock &&
|
||||
_db.KpDatabase.MasterKey.ContainsType(typeof(KcpPassword)) &&
|
||||
|
Loading…
Reference in New Issue
Block a user