X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/55c9c3a6c6bf6897daeb40348652f4203b7a2740..0b217c465dbf124c0f20b17b48d49e715e00603e:/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 581a686d..ded5edc9 100644 --- a/src/com/owncloud/android/services/OperationsService.java +++ b/src/com/owncloud/android/services/OperationsService.java @@ -435,13 +435,12 @@ 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) { - OwnCloudAccount ocAccount = new OwnCloudAccount(mLastTarget.mAccount, mService); - mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). - getClientFor(ocAccount, mService); + ocAccount = new OwnCloudAccount(mLastTarget.mAccount, mService); mStorageManager = new FileDataStorageManager( mLastTarget.mAccount, mService.getContentResolver() @@ -464,12 +463,12 @@ public class OperationsService extends Service { credentials = OwnCloudCredentialsFactory.newSamlSsoCredentials( mLastTarget.mCookie); // SAML SSO } - OwnCloudAccount ocAccount = new OwnCloudAccount( + ocAccount = new OwnCloudAccount( mLastTarget.mServerUrl, credentials); - mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). - getClientFor(ocAccount, mService); mStorageManager = null; } + mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton(). + getClientFor(ocAccount, mService); } /// perform the operation