- 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 != null) {
+ mOwnCloudClient.setWebdavUri(Uri.parse(mLastTarget.mWebDavUrl));
+ }
+ if (mLastTarget.mUsername != null && mLastTarget.mPassword != null) {
+ mOwnCloudClient.setBasicCredentials(mLastTarget.mUsername, mLastTarget.mPassword);
+ } else if (mLastTarget.mAuthToken != null) {
+ mOwnCloudClient.setBearerCredentials(mLastTarget.mAuthToken);
+ } else if (mLastTarget.mCookie != null) {
+ mOwnCloudClient.setSsoSessionCookie(mLastTarget.mCookie);
+ }