From: David A. Velasco Date: Tue, 8 Jul 2014 08:15:41 +0000 (+0200) Subject: Watch for replacements of favorite file besides than direct notifications X-Git-Tag: oc-android-1.7.0_signed~256^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e610046e0d91445cec74a875e5a55df14a93edcf?ds=inline;hp=--cc Watch for replacements of favorite file besides than direct notifications --- e610046e0d91445cec74a875e5a55df14a93edcf diff --git a/src/com/owncloud/android/files/OwnCloudFolderObserver.java b/src/com/owncloud/android/files/OwnCloudFolderObserver.java index db84448c..d958e2f5 100644 --- a/src/com/owncloud/android/files/OwnCloudFolderObserver.java +++ b/src/com/owncloud/android/files/OwnCloudFolderObserver.java @@ -92,27 +92,14 @@ public class OwnCloudFolderObserver extends FileObserver { synchronized(mObservedChildren) { if (path != null && path.length() > 0 && mObservedChildren.containsKey(path)) { - if ((event & FileObserver.MODIFY) != 0) { - if (!mObservedChildren.get(path)) { - mObservedChildren.put(path, Boolean.valueOf(true)); - } - } - - /* - if ((event & FileObserver.ATTRIB) != 0) { - if (mObservedChildren.get(path) != true) { - mObservedChildren.put(path, Boolean.valueOf(true)); - } - } - */ - - /* - if ((event & FileObserver.MOVED_TO) != 0) { + if ( ((event & FileObserver.MODIFY) != 0) || + ((event & FileObserver.ATTRIB) != 0) || + ((event & FileObserver.MOVED_TO) != 0) ) { + if (mObservedChildren.get(path) != true) { mObservedChildren.put(path, Boolean.valueOf(true)); } } - */ if ((event & FileObserver.CLOSE_WRITE) != 0) { mObservedChildren.put(path, Boolean.valueOf(false));