private static final String TAG = GetServerInfoOperation.class.getSimpleName();
private String mUrl;
- private String mAuthTokenType;
private Context mContext;
private ServerInfo mResultData;
* Constructor.
*
* @param url URL to an ownCloud server.
- * @param authTokenType Identifies the authorization token supported by the caller;
- * TODO ugly dependency, get rid of it.
* @param context Android context; needed to check network state
* TODO ugly dependency, get rid of it.
*/
- public GetServerInfoOperation(String url, String authTokenType, Context context) {
+ public GetServerInfoOperation(String url, Context context) {
mUrl = trimWebdavSuffix(url);
- mAuthTokenType = authTokenType;
mContext = context;
mResultData = new ServerInfo();
private RemoteOperationResult detectAuthorizationMethod(OwnCloudClient client) {
Log_OC.d(TAG, "Trying empty authorization to detect authentication method");
- String webdav_path = AccountUtils.getWebdavPath(mResultData.mVersion, mAuthTokenType);
- String webdav_url = mResultData.mBaseUrl + webdav_path;
DetectAuthenticationMethodOperation operation =
- new DetectAuthenticationMethodOperation(mContext, webdav_url);
+ new DetectAuthenticationMethodOperation(mContext);
return operation.execute(client);
}