X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/11b88e0fccfdc94dd30f44b70361219d759648ac..ac07e35d8ab68bf94d5cd8b45680ea69247fcc9f:/src/com/owncloud/android/files/services/FileDownloader.java diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index 665290cf..ed83d863 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -200,6 +200,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis * @param file A file that could be in the queue of downloads. */ public boolean isDownloading(Account account, OCFile file) { + if (account == null || file == null) return false; String targetKey = buildRemoteName(account, file); synchronized (mPendingDownloads) { if (file.isDirectory()) { @@ -270,7 +271,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis if (mDownloadClient == null || !mLastAccount.equals(mCurrentDownload.getAccount())) { mLastAccount = mCurrentDownload.getAccount(); mStorageManager = new FileDataStorageManager(mLastAccount, getContentResolver()); - mDownloadClient = OwnCloudClientUtils.createOwnCloudClient(mLastAccount, this); + mDownloadClient = OwnCloudClientUtils.createOwnCloudClient(mLastAccount, getApplicationContext()); } /// perform the download