X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/23a1ea68e0362d8169a15c49e470fb3137692780..75d58e44a60bb7a6feaf49c05e247cafeeaa1d64:/src/com/owncloud/android/operations/RemoteOperationResult.java diff --git a/src/com/owncloud/android/operations/RemoteOperationResult.java b/src/com/owncloud/android/operations/RemoteOperationResult.java index 0a0b932c..999974cf 100644 --- a/src/com/owncloud/android/operations/RemoteOperationResult.java +++ b/src/com/owncloud/android/operations/RemoteOperationResult.java @@ -24,7 +24,6 @@ import java.net.MalformedURLException; import java.net.SocketException; import java.net.SocketTimeoutException; import java.net.UnknownHostException; -import java.util.Map; import javax.net.ssl.SSLException; @@ -52,7 +51,7 @@ import com.owncloud.android.network.CertificateCombinedException; public class RemoteOperationResult implements Serializable { /** Generated - should be refreshed every time the class changes!! */ - private static final long serialVersionUID = 3267227833178885664L; + private static final long serialVersionUID = -4415103901492836870L; private static final String TAG = "RemoteOperationResult"; @@ -86,7 +85,9 @@ public class RemoteOperationResult implements Serializable { OAUTH2_ERROR_ACCESS_DENIED, QUOTA_EXCEEDED, ACCOUNT_NOT_FOUND, - ACCOUNT_EXCEPTION + ACCOUNT_EXCEPTION, + ACCOUNT_NOT_NEW, + ACCOUNT_NOT_THE_SAME } private boolean mSuccess = false; @@ -298,6 +299,12 @@ public class RemoteOperationResult implements Serializable { } else if (mCode == ResultCode.LOCAL_STORAGE_NOT_MOVED) { return "Error while moving file to final directory"; + + } else if (mCode == ResultCode.ACCOUNT_NOT_NEW) { + return "Account already existing when creating a new one"; + + } else if (mCode == ResultCode.ACCOUNT_NOT_THE_SAME) { + return "Authenticated with a different account than the one updating"; } return "Operation finished with HTTP status code " + mHttpCode + " (" + (isSuccess() ? "success" : "fail") + ")"; @@ -319,5 +326,11 @@ public class RemoteOperationResult implements Serializable { public String getRedirectedLocation() { return mRedirectedLocation; } + + public boolean isIdPRedirection() { + return (mRedirectedLocation != null && + (mRedirectedLocation.toUpperCase().contains("SAML") || + mRedirectedLocation.toLowerCase().contains("wayf"))); + } }