1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Changes from comments in PR#443

This commit is contained in:
masensio 2014-03-20 16:50:35 +01:00
parent 30acd4875d
commit f63da07a3e

View File

@ -59,8 +59,8 @@ import android.util.Log;
*/
public class RemoteOperationResult implements Serializable {
/** Generated - should be refreshed every time the class changes!! */
private static final long serialVersionUID = -8257349554488668693L;
/** Generated - should be refreshed every time the class changes!! */;
private static final long serialVersionUID = 6160608497101537164L;
private static final String TAG = "RemoteOperationResult";
@ -105,6 +105,7 @@ public class RemoteOperationResult implements Serializable {
private Exception mException = null;
private ResultCode mCode = ResultCode.UNKNOWN_ERROR;
private String mRedirectedLocation;
private String mAuthenticate;
private ArrayList<Object> mData;
@ -155,6 +156,10 @@ public class RemoteOperationResult implements Serializable {
mRedirectedLocation = current.getValue();
break;
}
if ("WWW-Authenticate".equals(current.getName())) {
mAuthenticate = current.getValue();
break;
}
}
}
}
@ -360,4 +365,9 @@ public class RemoteOperationResult implements Serializable {
mRedirectedLocation.toLowerCase().contains("wayf")));
}
public boolean isBasicAuthentication() {
return (mAuthenticate != null &&
(mAuthenticate.toUpperCase().startsWith("BASIC")));
}
}