X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/3605bd70da54e8375387ce0c6be4654c768c7c45..ec6b9d7c70deb50152bfab5cb5f25c9a2dde28e7:/src/com/owncloud/android/services/OperationsService.java diff --git a/src/com/owncloud/android/services/OperationsService.java b/src/com/owncloud/android/services/OperationsService.java index ded5edc9..581a686d 100644 --- a/src/com/owncloud/android/services/OperationsService.java +++ b/src/com/owncloud/android/services/OperationsService.java @@ -435,12 +435,13 @@ public class OperationsService extends Service { mCurrentOperation = next.second; RemoteOperationResult result = null; try { - OwnCloudAccount ocAccount; /// prepare client object to send the request to the ownCloud server if (mLastTarget == null || !mLastTarget.equals(next.first)) { mLastTarget = next.first; if (mLastTarget.mAccount != null) { - ocAccount = new OwnCloudAccount(mLastTarget.mAccount, mService); + OwnCloudAccount ocAccount = new OwnCloudAccount(mLastTarget.mAccount, mService); + mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). + getClientFor(ocAccount, mService); mStorageManager = new FileDataStorageManager( mLastTarget.mAccount, mService.getContentResolver() @@ -463,12 +464,12 @@ public class OperationsService extends Service { credentials = OwnCloudCredentialsFactory.newSamlSsoCredentials( mLastTarget.mCookie); // SAML SSO } - ocAccount = new OwnCloudAccount( + OwnCloudAccount ocAccount = new OwnCloudAccount( mLastTarget.mServerUrl, credentials); + mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). + getClientFor(ocAccount, mService); mStorageManager = null; } - mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). - getClientFor(ocAccount, mService); } /// perform the operation