-
- mOwnCloudClient = ((MainApp)getApplicationContext()).
- getOwnCloudClientManager().getClientFor(
- mLastTarget.mServerUrl,
- credentials, // still can be null, and that is right
- this);
-
- if (mLastTarget.mWebDavUrl != null) {
- mOwnCloudClient.setWebdavUri(Uri.parse(mLastTarget.mWebDavUrl));
- }
- mOwnCloudClient.setFollowRedirects(mLastTarget.mFollowRedirects);
+ OwnCloudAccount ocAccount = new OwnCloudAccount(
+ mLastTarget.mServerUrl, credentials);
+ mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton().
+ getClientFor(ocAccount, this);