diff --git a/src/keepass2android/KeePass.cs b/src/keepass2android/KeePass.cs index a5b37b10..514f6bbb 100644 --- a/src/keepass2android/KeePass.cs +++ b/src/keepass2android/KeePass.cs @@ -39,7 +39,6 @@ namespace keepass2android public const Result ExitRefresh = Result.FirstUser+2; public const Result ExitRefreshTitle = Result.FirstUser+3; public const Result ExitCloseAfterTaskComplete = Result.FirstUser+4; - public const Result ExitChangeDb = Result.FirstUser+5; // NOTE: Nothing is currently using this, but in the future a "Change Database" menu option might. public const Result ExitReloadDb = Result.FirstUser+6; AppTask _appTask; diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 36db7c2b..3e4e7dc1 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -147,10 +147,6 @@ namespace keepass2android case KeePass.ExitLock: // The database has already been locked, and the quick unlock screen will be shown if appropriate break; - case KeePass.ExitChangeDb: - App.Kp2a.LockDatabase(false); - Finish(); - break; case KeePass.ExitCloseAfterTaskComplete: // Do not lock the database SetResult(KeePass.ExitCloseAfterTaskComplete); @@ -415,7 +411,7 @@ namespace keepass2android // OnResume is run every time the activity comes to the foreground. This code should only run when the activity is started (OnStart), but must // be run in OnResume rather than OnStart so that it always occurrs after OnActivityResult (when re-creating a killed activity, OnStart occurs before OnActivityResult) - if (_started) + if (_started && !IsFinishing) //use !IsFinishing to make sure we're not starting another activity when we're already finishing (e.g. due to TaskComplete in OnActivityResult) { _started = false; if (App.Kp2a.DatabaseIsUnlocked)