Merge branch 'download_folder__refactoring_observance_of_downloads_in_progress' into...
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / FileOperationsHelper.java
index 61094d1..c8cb275 100644 (file)
@@ -287,7 +287,7 @@ public class FileOperationsHelper {
         if (!file.isFolder()) {
             FileDownloaderBinder downloaderBinder = mFileActivity.getFileDownloaderBinder();
             FileUploaderBinder uploaderBinder = mFileActivity.getFileUploaderBinder();
         if (!file.isFolder()) {
             FileDownloaderBinder downloaderBinder = mFileActivity.getFileDownloaderBinder();
             FileUploaderBinder uploaderBinder = mFileActivity.getFileUploaderBinder();
-            if (downloaderBinder != null && downloaderBinder.isDownloading(account, file)) {
+            if (downloaderBinder != null && file.isDownloading()) {
                 // Remove etag for parent, if file is a keep_in_sync
                 if (file.keepInSync()) {
                     OCFile parent = mFileActivity.getStorageManager().getFileById(file.getParentId());
                 // Remove etag for parent, if file is a keep_in_sync
                 if (file.keepInSync()) {
                     OCFile parent = mFileActivity.getStorageManager().getFileById(file.getParentId());
@@ -304,8 +304,9 @@ public class FileOperationsHelper {
             Intent intent = new Intent(mFileActivity, OperationsService.class);
             intent.setAction(OperationsService.ACTION_CANCEL_SYNC_FOLDER);
             intent.putExtra(OperationsService.EXTRA_ACCOUNT, account);
             Intent intent = new Intent(mFileActivity, OperationsService.class);
             intent.setAction(OperationsService.ACTION_CANCEL_SYNC_FOLDER);
             intent.putExtra(OperationsService.EXTRA_ACCOUNT, account);
-            intent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+            intent.putExtra(OperationsService.EXTRA_FILE, file);
             mFileActivity.startService(intent);
             mFileActivity.startService(intent);
+
         }
     }
 
         }
     }