* @param file A file that could be in the queue of downloads.\r
*/\r
public boolean isDownloading(Account account, OCFile file) {\r
+ if (account == null || file == null) return false;\r
String targetKey = buildRemoteName(account, file);\r
synchronized (mPendingDownloads) {\r
if (file.isDirectory()) {\r
if (mDownloadClient == null || !mLastAccount.equals(mCurrentDownload.getAccount())) {\r
mLastAccount = mCurrentDownload.getAccount();\r
mStorageManager = new FileDataStorageManager(mLastAccount, getContentResolver());\r
- mDownloadClient = OwnCloudClientUtils.createOwnCloudClient(mLastAccount, this);\r
+ mDownloadClient = OwnCloudClientUtils.createOwnCloudClient(mLastAccount, getApplicationContext());\r
}\r
\r
/// perform the download\r