From e57caf96c242061cfd5f19ab92c3110292a22c72 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Wed, 6 Mar 2019 01:38:31 +0100 Subject: [PATCH] Use model/Folder defaults for the camera folder (fixes #352) (#353) --- .../java/com/nutomic/syncthingandroid/util/ConfigXml.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java index e781e055..3c8ff890 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -963,6 +963,7 @@ public class ConfigXml { * Returns if changes to the config have been made. */ private boolean changeDefaultFolder() { + Folder defaultFolder = new Folder(); Element folder = (Element) mConfig.getDocumentElement() .getElementsByTagName("folder").item(0); String deviceModel = Build.MODEL @@ -975,8 +976,9 @@ public class ConfigXml { folder.setAttribute("path", Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath()); folder.setAttribute("type", Constants.FOLDER_TYPE_SEND_ONLY); - folder.setAttribute("fsWatcherEnabled", "true"); - folder.setAttribute("fsWatcherDelayS", "10"); + folder.setAttribute("fsWatcherEnabled", Boolean.toString(defaultFolder.fsWatcherEnabled)); + folder.setAttribute("fsWatcherDelayS", Integer.toString(defaultFolder.fsWatcherDelayS)); + setConfigElement(folder, "useLargeBlocks", Boolean.toString(defaultFolder.useLargeBlocks)); return true; }