mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-08 00:16:09 +00:00
Merge pull request #144 from owncloud/bug_1722_maintenance_mode
Handle 503 code error
This commit is contained in:
commit
67665b8691
@ -3,7 +3,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.0'
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ import java.net.SocketException;
|
|||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import android.accounts.Account;
|
import android.accounts.Account;
|
||||||
import android.accounts.AccountsException;
|
import android.accounts.AccountsException;
|
||||||
|
|
||||||
@ -61,9 +62,10 @@ import javax.net.ssl.SSLException;
|
|||||||
*/
|
*/
|
||||||
public class RemoteOperationResult implements Serializable {
|
public class RemoteOperationResult implements Serializable {
|
||||||
|
|
||||||
/** Generated - should be refreshed every time the class changes!! */;
|
/** Generated - should be refreshed every time the class changes!! */
|
||||||
private static final long serialVersionUID = 1129130415603799707L;
|
;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -1909603208238358633L;
|
||||||
private static final String TAG = RemoteOperationResult.class.getSimpleName();
|
private static final String TAG = RemoteOperationResult.class.getSimpleName();
|
||||||
|
|
||||||
public enum ResultCode {
|
public enum ResultCode {
|
||||||
@ -112,7 +114,8 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
WRONG_SERVER_RESPONSE,
|
WRONG_SERVER_RESPONSE,
|
||||||
INVALID_CHARACTER_DETECT_IN_SERVER,
|
INVALID_CHARACTER_DETECT_IN_SERVER,
|
||||||
DELAYED_FOR_WIFI,
|
DELAYED_FOR_WIFI,
|
||||||
LOCAL_FILE_NOT_FOUND
|
LOCAL_FILE_NOT_FOUND,
|
||||||
|
MAINTENANCE_MODE
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean mSuccess = false;
|
private boolean mSuccess = false;
|
||||||
@ -160,6 +163,9 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
case HttpStatus.SC_FORBIDDEN:
|
case HttpStatus.SC_FORBIDDEN:
|
||||||
mCode = ResultCode.FORBIDDEN;
|
mCode = ResultCode.FORBIDDEN;
|
||||||
break;
|
break;
|
||||||
|
case HttpStatus.SC_SERVICE_UNAVAILABLE:
|
||||||
|
mCode = ResultCode.MAINTENANCE_MODE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
mCode = ResultCode.UNHANDLED_HTTP_CODE;
|
mCode = ResultCode.UNHANDLED_HTTP_CODE;
|
||||||
Log_OC.d(TAG, "RemoteOperationResult has processed UNHANDLED_HTTP_CODE: " +
|
Log_OC.d(TAG, "RemoteOperationResult has processed UNHANDLED_HTTP_CODE: " +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user