1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 19:31:30 +00:00

Adjust folder rescan interval (#1069)

This commit is contained in:
Catfriend1 2018-04-28 17:44:55 +02:00 committed by Audrius Butkevicius
parent 638789c7b1
commit 69885e2aa2
3 changed files with 8 additions and 14 deletions

View file

@ -431,15 +431,13 @@ public class FolderActivity extends SyncthingActivity
? getIntent().getStringExtra(EXTRA_FOLDER_ID) ? getIntent().getStringExtra(EXTRA_FOLDER_ID)
: generateRandomFolderId(); : generateRandomFolderId();
mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL); mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.M) { mFolder.fsWatcherEnabled = true;
// Scan every hour (in case real time change detection failed) mFolder.fsWatcherDelayS = 10;
/**
* Folder rescan interval defaults to 3600s as it is the default in
* syncthing when the file watcher is enabled and a new folder is created.
*/
mFolder.rescanIntervalS = 3600; mFolder.rescanIntervalS = 3600;
}
else {
// FileObserver is broken on Marshmallow.
// https://github.com/syncthing/syncthing-android/issues/787
mFolder.rescanIntervalS = 300;
}
mFolder.versioning = new Folder.Versioning(); mFolder.versioning = new Folder.Versioning();
} }

View file

@ -262,7 +262,7 @@ public class SyncthingService extends Service {
} }
/** /**
* Stop Syncthing and all helpers like event processor, api handler and folder observers. * Stop Syncthing and all helpers like event processor and api handler.
* *
* Sets {@link #mCurrentState} to newState, and calls onKilledListener once Syncthing is killed. * Sets {@link #mCurrentState} to newState, and calls onKilledListener once Syncthing is killed.
*/ */

View file

@ -349,10 +349,6 @@ Please report any problems you encounter via Github.</string>
<string name="use_legacy_hashing_summary">Force Syncthing to use legacy hashing package for compatibility purposes</string> <string name="use_legacy_hashing_summary">Force Syncthing to use legacy hashing package for compatibility purposes</string>
<string name="use_folder_observer_title">Use deprecated change detection</string>
<string name="use_folder_observer_summary">Default: Disabled. Use deprecated android implementation to detect filesystem changes instead of SyncThing\'s new built-in feature.</string>
<string name="restart_on_wakeup_title">Restart on Wakeup</string> <string name="restart_on_wakeup_title">Restart on Wakeup</string>
<string name="restart_on_wakeup_summary">Default: Enabled. Disabling this feature may result in folder scans and device reconnects being delayed to save battery.</string> <string name="restart_on_wakeup_summary">Default: Enabled. Disabling this feature may result in folder scans and device reconnects being delayed to save battery.</string>