1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-11 04:25:53 +00:00

Only set short rescan interval on Android 6 (fixes #787)

This commit is contained in:
Felix Ableitner 2016-11-20 13:42:44 +09:00
parent ac5e35636a
commit 113d712d5f

View file

@ -333,14 +333,13 @@ public class FolderActivity extends SyncthingActivity
mFolder = new Folder(); mFolder = new Folder();
mFolder.id = getIntent().getStringExtra(EXTRA_FOLDER_ID); mFolder.id = getIntent().getStringExtra(EXTRA_FOLDER_ID);
mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL); mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT != Build.VERSION_CODES.M) {
// Scan every 3 days (in case inotify dropped some changes) // Scan every 3 days (in case inotify dropped some changes)
mFolder.rescanIntervalS = 259200; mFolder.rescanIntervalS = 259200;
} }
else { else {
// FileObserver does not work correctly on Android Marshmallow. // FileObserver is broken on Marshmallow.
// Nougat seems to have the same problem in emulator, but we should check this again. // https://github.com/syncthing/syncthing-android/issues/787
// https://code.google.com/p/android/issues/detail?id=189231
mFolder.rescanIntervalS = 60; mFolder.rescanIntervalS = 60;
} }
mFolder.versioning = new Folder.Versioning(); mFolder.versioning = new Folder.Versioning();