- mOwnCloudClient = OwnCloudClientFactory.createOwnCloudClient(mLastTarget.mServerUrl, getApplicationContext(), true); // this is not good enough
+ mOwnCloudClient = OwnCloudClientFactory.createOwnCloudClient(mLastTarget.mServerUrl, getApplicationContext(),
+ mLastTarget.mFollowRedirects); // this is not good enough
+ if (mLastTarget.mWebDavUrl != "") {
+ mOwnCloudClient.setWebdavUri(Uri.parse(mLastTarget.mWebDavUrl));
+ }
+ if (mLastTarget.mUsername != "" && mLastTarget.mPassword != "") {
+ mOwnCloudClient.setBasicCredentials(mLastTarget.mUsername, mLastTarget.mPassword);
+ } else if (mLastTarget.mAuthToken != "") {
+ mOwnCloudClient.setBearerCredentials(mLastTarget.mAuthToken);
+ } else if (mLastTarget.mCookie != "") {
+ mOwnCloudClient.setSsoSessionCookie(mLastTarget.mCookie);
+ }