projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactored remove file operation (inherits RemoteOperation, so generates RemoteOperat...
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
operations
/
DownloadFileOperation.java
diff --git
a/src/com/owncloud/android/operations/DownloadFileOperation.java
b/src/com/owncloud/android/operations/DownloadFileOperation.java
index
f3ce4b1
..
c732c8b
100644
(file)
--- a/
src/com/owncloud/android/operations/DownloadFileOperation.java
+++ b/
src/com/owncloud/android/operations/DownloadFileOperation.java
@@
-52,11
+52,10
@@
public class DownloadFileOperation extends RemoteOperation {
private static final String TAG = DownloadFileOperation.class.getCanonicalName();
private static final String TAG = DownloadFileOperation.class.getCanonicalName();
- private Account mAccount
= null
;
+ private Account mAccount;
private OCFile mFile;
private OCFile mFile;
- private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
-
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
+ private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
public DownloadFileOperation(Account account, OCFile file) {
public DownloadFileOperation(Account account, OCFile file) {
@@
-91,7
+90,7
@@
public class DownloadFileOperation extends RemoteOperation {
}
public String getMimeType() {
}
public String getMimeType() {
- String mimeType = mFile.getMimetype();
+ String mimeType = mFile.getMimetype();
// TODO fix the mime types in OCFiles FOREVER
if (mimeType == null || mimeType.length() <= 0) {
try {
mimeType = MimeTypeMap.getSingleton()
if (mimeType == null || mimeType.length() <= 0) {
try {
mimeType = MimeTypeMap.getSingleton()
@@
-120,7
+119,7
@@
public class DownloadFileOperation extends RemoteOperation {
protected RemoteOperationResult run(WebdavClient client) {
RemoteOperationResult result = null;
File newFile = null;
protected RemoteOperationResult run(WebdavClient client) {
RemoteOperationResult result = null;
File newFile = null;
- boolean moved =
fals
e;
+ boolean moved =
tru
e;
/// download will be performed to a temporal file, then moved to the final location
File tmpFile = new File(getTmpPath());
/// download will be performed to a temporal file, then moved to the final location
File tmpFile = new File(getTmpPath());