mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Watch for replacements of favorite file besides than direct notifications
This commit is contained in:
parent
e2a7e9bbf9
commit
e610046e0d
1 changed files with 4 additions and 17 deletions
|
@ -92,27 +92,14 @@ public class OwnCloudFolderObserver extends FileObserver {
|
||||||
synchronized(mObservedChildren) {
|
synchronized(mObservedChildren) {
|
||||||
if (path != null && path.length() > 0 && mObservedChildren.containsKey(path)) {
|
if (path != null && path.length() > 0 && mObservedChildren.containsKey(path)) {
|
||||||
|
|
||||||
if ((event & FileObserver.MODIFY) != 0) {
|
if ( ((event & FileObserver.MODIFY) != 0) ||
|
||||||
if (!mObservedChildren.get(path)) {
|
((event & FileObserver.ATTRIB) != 0) ||
|
||||||
mObservedChildren.put(path, Boolean.valueOf(true));
|
((event & FileObserver.MOVED_TO) != 0) ) {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
if ((event & FileObserver.ATTRIB) != 0) {
|
|
||||||
if (mObservedChildren.get(path) != true) {
|
if (mObservedChildren.get(path) != true) {
|
||||||
mObservedChildren.put(path, Boolean.valueOf(true));
|
mObservedChildren.put(path, Boolean.valueOf(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
if ((event & FileObserver.MOVED_TO) != 0) {
|
|
||||||
if (mObservedChildren.get(path) != true) {
|
|
||||||
mObservedChildren.put(path, Boolean.valueOf(true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((event & FileObserver.CLOSE_WRITE) != 0) {
|
if ((event & FileObserver.CLOSE_WRITE) != 0) {
|
||||||
mObservedChildren.put(path, Boolean.valueOf(false));
|
mObservedChildren.put(path, Boolean.valueOf(false));
|
||||||
|
|
Loading…
Reference in a new issue