X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/44023a60595df66f1250ef84feaf612eb0463fd7..HEAD:/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 16d9d5c0..513a639f 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -174,10 +174,11 @@ public class FileDownloader extends Service Pair putResult = mPendingDownloads.putIfAbsent( account, file.getRemotePath(), newDownload ); - String downloadKey = putResult.first; - requestedDownloads.add(downloadKey); - - sendBroadcastNewDownload(newDownload, putResult.second); + if (putResult != null) { + String downloadKey = putResult.first; + requestedDownloads.add(downloadKey); + sendBroadcastNewDownload(newDownload, putResult.second); + } // else, file already in the queue of downloads; don't repeat the request } catch (IllegalArgumentException e) { Log_OC.e(TAG, "Not enough information provided in intent: " + e.getMessage()); @@ -471,7 +472,7 @@ public class FileDownloader extends Service file.setRemoteId(mCurrentDownload.getFile().getRemoteId()); mStorageManager.saveFile(file); mStorageManager.triggerMediaScan(file.getStoragePath()); - mStorageManager.saveConflict(file, false); + mStorageManager.saveConflict(file, null); } /**