projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'download_folder__refactoring_observance_of_downloads_in_progress' into...
[pub/Android/ownCloud.git]
/
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
3bf6dd4
..
741e30a
100644
(file)
--- 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);
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) {
sendBroadcastNewDownload(newDownload);
} catch (IllegalArgumentException e) {
@@
-253,6
+259,7
@@
public class FileDownloader extends Service implements OnDatatransferProgressLis
* @param account Owncloud account where the remote file is stored.
* @param file A file that could be in the queue of downloads.
*/
* @param account Owncloud account where the remote file is stored.
* @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);
public boolean isDownloading(Account account, OCFile file) {
if (account == null || file == null) return false;
String targetKey = buildRemoteName(account, file);
@@
-270,6
+277,7
@@
public class FileDownloader extends Service implements OnDatatransferProgressLis
}
}
}
}
}
}
+ */
/**
/**