remove debugging code, resolve some TODOs
This commit is contained in:
@@ -46,9 +46,6 @@ namespace keepass2android
|
||||
StatusLogger.UpdateSubMessage(_app.GetResourceString(UiStringKey.DownloadingRemoteFile));
|
||||
string hash;
|
||||
|
||||
//TODO remove
|
||||
Thread.Sleep(5000);
|
||||
|
||||
MemoryStream remoteData;
|
||||
try
|
||||
{
|
||||
@@ -68,14 +65,10 @@ namespace keepass2android
|
||||
//check if remote file was modified:
|
||||
var baseVersionHash = cachingFileStorage.GetBaseVersionHash(ioc);
|
||||
Kp2aLog.Log("Checking for file change. baseVersionHash = " + baseVersionHash);
|
||||
if (baseVersionHash != hash ||
|
||||
true //TODO remove
|
||||
)
|
||||
if (baseVersionHash != hash)
|
||||
{
|
||||
//remote file is modified
|
||||
if (cachingFileStorage.HasLocalChanges(ioc)
|
||||
|| true //TODO remove
|
||||
)
|
||||
if (cachingFileStorage.HasLocalChanges(ioc))
|
||||
{
|
||||
//conflict! need to merge
|
||||
var _saveDb = new SaveDb(_app, new ActionOnOperationFinished(_app,
|
||||
|
||||
@@ -143,17 +143,11 @@ namespace keepass2android
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//TODO remove
|
||||
Thread.Sleep(5000);
|
||||
|
||||
|
||||
|
||||
bool hasStreamForOrigFile = (_streamForOrigFile != null);
|
||||
bool hasChangeFast = hasStreamForOrigFile ||
|
||||
fileStorage.CheckForFileChangeFast(ioc, _db.LastFileVersion); //first try to use the fast change detection;
|
||||
bool hasHashChanged = !requiresSubsequentSync && (
|
||||
//TODO remove
|
||||
true ||
|
||||
hasChangeFast ||
|
||||
(FileHashChanged(ioc, _db.KpDatabase.HashOfFileOnDisk) ==
|
||||
FileHashChange.Changed)); //if that fails, hash the file and compare:
|
||||
@@ -278,7 +272,9 @@ namespace keepass2android
|
||||
PerformSaveWithoutCheck(fileStorage, ioc);
|
||||
new Handler(Looper.MainLooper).Post(() =>
|
||||
{
|
||||
Kp2aLog.Log("OPR: Starting posted UpdateGlobals");
|
||||
_db.UpdateGlobals();
|
||||
Kp2aLog.Log("OPR: Finished posted UpdateGlobals");
|
||||
});
|
||||
|
||||
FinishWithSuccess();
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="DbQuicklockedChannel_desc">Notification about the database being locked with QuickUnlock</string>
|
||||
<string name="EntryChannel_name">Entry notifications</string>
|
||||
<string name="EntryChannel_desc">Notification to simplify access to the currently selected entry.</string>
|
||||
<string name="BackgroundSyncChannel_name">Synchronization operation</string>
|
||||
<string name="BackgroundSyncChannel_desc">Notification to indicate that a synchronization is performed in the background.</string>
|
||||
|
||||
<string name="CloseDbAfterFailedAttempts">Close database after three failed biometric unlock attempts.</string>
|
||||
<string name="WarnFingerprintInvalidated">Warning! Biometric authentication can be invalidated by Android, e.g. after adding a new fingerprint in your device settings. Make sure you always know how to unlock with your master password!</string>
|
||||
|
||||
|
||||
@@ -100,14 +100,17 @@ namespace keepass2android.services
|
||||
{
|
||||
if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
|
||||
{
|
||||
//TODO
|
||||
var channelName = "Foreground Service Channel";
|
||||
var channelDescription = "Channel for foreground service";
|
||||
var channelName = GetString(Resource.String.BackgroundSyncChannel_name);
|
||||
var channelDescription = GetString(Resource.String.BackgroundSyncChannel_desc);
|
||||
var channelImportance = NotificationImportance.Default;
|
||||
var channel = new NotificationChannel(ChannelId, channelName, channelImportance)
|
||||
{
|
||||
Description = channelDescription
|
||||
};
|
||||
channel.EnableLights(false);
|
||||
channel.EnableVibration(false);
|
||||
channel.SetSound(null, null);
|
||||
channel.SetShowBadge(false);
|
||||
|
||||
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
||||
notificationManager.CreateNotificationChannel(channel);
|
||||
|
||||
Reference in New Issue
Block a user