diff --git a/src/KeePassLib2Android/IDatabaseLoader.cs b/src/KeePassLib2Android/IDatabaseLoader.cs index 70f5f033..ee879f98 100644 --- a/src/KeePassLib2Android/IDatabaseLoader.cs +++ b/src/KeePassLib2Android/IDatabaseLoader.cs @@ -11,5 +11,6 @@ namespace KeePassLib byte[] HashOfLastStream { get; } bool CanWrite { get; } + string SuccessMessage { get; } } } \ No newline at end of file diff --git a/src/KeePassLib2Android/KeePassLib2Android.csproj b/src/KeePassLib2Android/KeePassLib2Android.csproj index e0197cb9..9f86c555 100644 --- a/src/KeePassLib2Android/KeePassLib2Android.csproj +++ b/src/KeePassLib2Android/KeePassLib2Android.csproj @@ -20,7 +20,7 @@ full False bin\Debug - DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM + DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM prompt 4 False diff --git a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj index 3cf72e29..87e7748b 100644 --- a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj +++ b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj @@ -20,7 +20,7 @@ full false bin\Debug\ - TRACE;DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM + TRACE;DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM prompt 4 @@ -55,7 +55,6 @@ - diff --git a/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs b/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs index 86009f9f..7f5c68a0 100644 --- a/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs +++ b/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs @@ -164,6 +164,11 @@ namespace keepass2android #endif public byte[] HashOfLastStream { get; private set; } public bool CanWrite { get { return false; } } + public string SuccessMessage { get + { + return + ".kdb-support is read-only. Export as .kdbx if you want to modify the database. This app is for use with Keepass 2.x!"; + } } } diff --git a/src/Kp2aBusinessLogic/database/KdbxDatabaseLoader.cs b/src/Kp2aBusinessLogic/database/KdbxDatabaseLoader.cs index 974a76bc..33bb312b 100644 --- a/src/Kp2aBusinessLogic/database/KdbxDatabaseLoader.cs +++ b/src/Kp2aBusinessLogic/database/KdbxDatabaseLoader.cs @@ -28,5 +28,6 @@ namespace keepass2android public byte[] HashOfLastStream { get; private set; } public bool CanWrite { get { return true; } } + public string SuccessMessage { get { return null; } } } } \ No newline at end of file diff --git a/src/Kp2aBusinessLogic/database/edit/LoadDB.cs b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs index 2d87f8f6..e724c033 100644 --- a/src/Kp2aBusinessLogic/database/edit/LoadDB.cs +++ b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs @@ -115,7 +115,7 @@ namespace keepass2android _app.LoadDatabase(_ioc, workingCopy, _compositeKey, StatusLogger, _loader); SaveFileData(_ioc, _keyfileOrProvider); Kp2aLog.Log("LoadDB OK"); - Finish(true); + Finish(true, _loader.SuccessMessage); } catch (OldFormatException) { diff --git a/src/Kp2aUnitTests/TestLoadDb.cs b/src/Kp2aUnitTests/TestLoadDb.cs index 20c30160..24d800bc 100644 --- a/src/Kp2aUnitTests/TestLoadDb.cs +++ b/src/Kp2aUnitTests/TestLoadDb.cs @@ -99,6 +99,8 @@ namespace Kp2aUnitTests [TestMethod] public void LoadFromRemoteWithDomain() { + //warning, looks like credentials are no longer valid + var ioc = RemoteDomainIoc; //note: this property is defined in "TestLoadDbCredentials.cs" which is deliberately excluded from Git because the credentials are not public! var app = new TestKp2aApp(); app.ServerCertificateErrorResponse = true; //accept invalid cert diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 1557fa85..e517a5b3 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -1132,10 +1132,8 @@ namespace keepass2android GC.Collect(); // Ensure temporary memory used while loading is collected } - else - { - DisplayMessage(_act); - } + DisplayMessage(_act); + } } diff --git a/src/keepass2android/keepass2android.csproj b/src/keepass2android/keepass2android.csproj index 9e94c4f3..8faf8f22 100644 --- a/src/keepass2android/keepass2android.csproj +++ b/src/keepass2android/keepass2android.csproj @@ -30,7 +30,7 @@ full false bin\Debug - DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM + DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE;INCLUDE_KEYTRANSFORM prompt 4 False