mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-08 00:16:09 +00:00
Added changes requested in PR
This commit is contained in:
parent
12e7af8af5
commit
626e2f0efa
@ -254,7 +254,7 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
ErrorMessageParser xmlParser = new ErrorMessageParser();
|
ErrorMessageParser xmlParser = new ErrorMessageParser();
|
||||||
try {
|
try {
|
||||||
String errorMessage = xmlParser.parseXMLResponse(is);
|
String errorMessage = xmlParser.parseXMLResponse(is);
|
||||||
if (errorMessage != "" && errorMessage != null) {
|
if (errorMessage != null && errorMessage != "") {
|
||||||
mCode = ResultCode.SPECIFIC_FORBIDDEN;
|
mCode = ResultCode.SPECIFIC_FORBIDDEN;
|
||||||
mHttpPhrase = errorMessage;
|
mHttpPhrase = errorMessage;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
|
|||||||
public class DownloadRemoteFileOperation extends RemoteOperation {
|
public class DownloadRemoteFileOperation extends RemoteOperation {
|
||||||
|
|
||||||
private static final String TAG = DownloadRemoteFileOperation.class.getSimpleName();
|
private static final String TAG = DownloadRemoteFileOperation.class.getSimpleName();
|
||||||
|
private static final int FORBIDDEN_ERROR = 403;
|
||||||
|
|
||||||
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
|
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
|
||||||
private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
|
private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
|
||||||
@ -161,7 +162,7 @@ public class DownloadRemoteFileOperation extends RemoteOperation {
|
|||||||
// TODO some kind of error control!
|
// TODO some kind of error control!
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (status != 403){
|
} else if (status != FORBIDDEN_ERROR){
|
||||||
client.exhaustResponse(mGet.getResponseBodyAsStream());
|
client.exhaustResponse(mGet.getResponseBodyAsStream());
|
||||||
|
|
||||||
} // else, body read by RemoteOeprationResult constructor
|
} // else, body read by RemoteOeprationResult constructor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user