Skip to content

Commit d79bfe5

Browse files
Merge branch 'master' into check_for_unshareable_federated_shares
2 parents 505a1d0 + 64d7734 commit d79bfe5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/com/owncloud/android/lib/common/operations/RemoteOperationResult.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ownCloud Android Library is available under MIT license
2-
* Copyright (C) 2015 ownCloud Inc.
2+
* Copyright (C) 2016 ownCloud GmbH.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal
@@ -66,8 +66,8 @@
6666
public class RemoteOperationResult implements Serializable {
6767

6868
/** Generated - should be refreshed every time the class changes!! */;
69-
private static final long serialVersionUID = 1129130415603799707L;
70-
69+
70+
private static final long serialVersionUID = -1909603208238358633L;
7171
private static final String TAG = RemoteOperationResult.class.getSimpleName();
7272

7373
public enum ResultCode {
@@ -118,7 +118,8 @@ public enum ResultCode {
118118
DELAYED_FOR_WIFI,
119119
DELAYED_FOR_CHARGING,
120120
LOCAL_FILE_NOT_FOUND,
121-
NOT_AVAILABLE
121+
NOT_AVAILABLE,
122+
MAINTENANCE_MODE
122123
}
123124

124125
private boolean mSuccess = false;
@@ -168,10 +169,12 @@ private RemoteOperationResult(boolean success, int httpCode) {
168169
case HttpStatus.SC_FORBIDDEN:
169170
mCode = ResultCode.FORBIDDEN;
170171
break;
172+
case HttpStatus.SC_SERVICE_UNAVAILABLE:
173+
mCode = ResultCode.MAINTENANCE_MODE;
174+
break;
171175
default:
172176
mCode = ResultCode.UNHANDLED_HTTP_CODE;
173-
Log_OC.d(TAG, "RemoteOperationResult has processed UNHANDLED_HTTP_CODE: " +
174-
httpCode);
177+
Log_OC.d(TAG, "RemoteOperationResult has processed UNHANDLED_HTTP_CODE: " + httpCode);
175178
}
176179
}
177180
}

0 commit comments

Comments
 (0)