From 113d712d5f90e3c10c79b44f7deacb20578b5972 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 20 Nov 2016 13:42:44 +0900 Subject: [PATCH] Only set short rescan interval on Android 6 (fixes #787) --- .../syncthingandroid/activities/FolderActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java index 387fbea1..29bc8f62 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java @@ -333,14 +333,13 @@ public class FolderActivity extends SyncthingActivity mFolder = new Folder(); mFolder.id = getIntent().getStringExtra(EXTRA_FOLDER_ID); 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) mFolder.rescanIntervalS = 259200; } else { - // FileObserver does not work correctly on Android Marshmallow. - // Nougat seems to have the same problem in emulator, but we should check this again. - // https://code.google.com/p/android/issues/detail?id=189231 + // FileObserver is broken on Marshmallow. + // https://github.com/syncthing/syncthing-android/issues/787 mFolder.rescanIntervalS = 60; } mFolder.versioning = new Folder.Versioning();