From: jabarros Date: Tue, 20 Jan 2015 11:27:40 +0000 (+0100) Subject: Store file on db with 'downloading' state after adding it to pending downloads X-Git-Tag: oc-android-1.7.0_signed~23^2~8^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/05c236ba628b92972ccf7cc0f3c765d04f577b28 Store file on db with 'downloading' state after adding it to pending downloads --- diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index 3bf6dd48..59982771 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -169,6 +169,12 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis newDownload.addDatatransferProgressListener(this); newDownload.addDatatransferProgressListener((FileDownloaderBinder) mBinder); requestedDownloads.add(downloadKey); + + // Store file on db with state 'downloading' + FileDataStorageManager storageManager = new FileDataStorageManager(account, getContentResolver()); + file.setDownloading(true); + storageManager.saveFile(file); + sendBroadcastNewDownload(newDownload); } catch (IllegalArgumentException e) {