* CachingFileStorage: Added more callbacks to provide user with more information what's going on

* Changed TestCacheSupervisor for easier use of the many callbacks
* Adapted tests for new callbacks

* GroupBaseActivity: Added sync menu command
* Preferences: Added option to enable/disable offline caching
* App: don't lock database when user wants to reload. This is done in PasswordActivity and should be done there after the password was filled into the pw field
* CheckDatabaseForChanges.cs: used when syncing a non-cached database
This commit is contained in:
Philipp Crocoll
2013-08-14 06:05:25 +02:00
parent d169cd3f5b
commit c63302ef5e
23 changed files with 1174 additions and 793 deletions

View File

@@ -48,7 +48,8 @@ namespace keepass2android
try
{
StatusLogger.UpdateMessage(UiStringKey.loading_database);
_app.LoadDatabase(_ioc, _databaseData == null ? null : _databaseData.Result, _pass, _key, StatusLogger);
MemoryStream memoryStream = _databaseData == null ? null : _databaseData.Result;
_app.LoadDatabase(_ioc, memoryStream, _pass, _key, StatusLogger);
SaveFileData (_ioc, _key);
} catch (KeyFileException) {
@@ -56,7 +57,7 @@ namespace keepass2android
Finish(false, /*TODO Localize: use Keepass error text KPRes.KeyFileError (including "or invalid format")*/ _app.GetResourceString(UiStringKey.keyfile_does_not_exist));
}
catch (Exception e) {
Kp2aLog.Log("Exception: " + e.Message);
Kp2aLog.Log("Exception: " + e);
Finish(false, "An error occured: " + e.Message);
return;
}