X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/732ab432a4945c4720bc039cec6bde52bdd63bf2..cc77ea37de47ecf8d0261978aa9de924c917deec:/src/com/owncloud/android/services/OperationsService.java diff --git a/src/com/owncloud/android/services/OperationsService.java b/src/com/owncloud/android/services/OperationsService.java index 6c6f24c4..385306dd 100644 --- a/src/com/owncloud/android/services/OperationsService.java +++ b/src/com/owncloud/android/services/OperationsService.java @@ -495,12 +495,13 @@ public class OperationsService extends Service { syncOperation.cancel(); } - Intent intent = new Intent( MainApp.getAppContext(), FileDownloader.class); + /// cancellation of download needs to be done separately in any case; a SynchronizeFolderOperation + // may finish much sooner than the real download of the files in the folder + Intent intent = new Intent(mService, FileDownloader.class); intent.setAction(FileDownloader.ACTION_CANCEL_FILE_DOWNLOAD); intent.putExtra(FileDownloader.EXTRA_ACCOUNT, account); intent.putExtra(FileDownloader.EXTRA_FILE, file); - MainApp.getAppContext().startService(intent); - + mService.startService(intent); } /**