Granted update of modificationTimestamp with the end of downloads and uploads
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileObserverService.java
index 70b6b21..41e4e52 100644 (file)
@@ -158,12 +158,12 @@ public class FileObserverService extends Service implements FileObserverStatusLi
             observer = mObservers.get(i);
             if (observer.getPath().equals(path))
                 duplicate = true;
             observer = mObservers.get(i);
             if (observer.getPath().equals(path))
                 duplicate = true;
-            observer.setContext(getBaseContext());
+            observer.setContext(getApplicationContext());
         }
         if (duplicate) return;
         observer = new OwnCloudFileObserver(path, OwnCloudFileObserver.CHANGES_ONLY);
         }
         if (duplicate) return;
         observer = new OwnCloudFileObserver(path, OwnCloudFileObserver.CHANGES_ONLY);
-        observer.setContext(getBaseContext());
-        Account account = AccountUtils.getCurrentOwnCloudAccount(getBaseContext());
+        observer.setContext(getApplicationContext());
+        Account account = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
         observer.setAccount(account);
         FileDataStorageManager storage =
                 new FileDataStorageManager(account, getContentResolver());
         observer.setAccount(account);
         FileDataStorageManager storage =
                 new FileDataStorageManager(account, getContentResolver());