X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/3351db65273a8d8ff1d012e00025e728cc428419..3d3046dc264792475c72987afc25beae23da4dc6:/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java diff --git a/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java b/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java index a9defc0b..77a7c361 100644 --- a/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java @@ -1,4 +1,7 @@ /* ownCloud Android client application + * + * @author sassman + * @author David A. Velasco * Copyright (C) 2011 Bartek Przybylski * Copyright (C) 2012-2013 ownCloud Inc. * @@ -27,9 +30,9 @@ import org.apache.http.client.ClientProtocolException; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException; -import com.owncloud.android.lib.common.OwnCloudClientFactory; +import com.owncloud.android.lib.common.OwnCloudAccount; import com.owncloud.android.lib.common.OwnCloudClient; - +import com.owncloud.android.lib.common.OwnCloudClientManagerFactory; import android.accounts.Account; import android.accounts.AccountManager; @@ -44,9 +47,6 @@ import android.content.Context; * resource types, like FileSync, ConcatsSync, CalendarSync, etc.. * * Implements the standard {@link AbstractThreadedSyncAdapter}. - * - * @author sassman - * @author David A. Velasco */ public abstract class AbstractOwnCloudSyncAdapter extends AbstractThreadedSyncAdapter { @@ -102,7 +102,9 @@ public abstract class AbstractOwnCloudSyncAdapter extends protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException { AccountUtils.constructFullURLForAccount(getContext(), account); - mClient = OwnCloudClientFactory.createOwnCloudClient(account, getContext()); + OwnCloudAccount ocAccount = new OwnCloudAccount(account, getContext()); + mClient = OwnCloudClientManagerFactory.getDefaultSingleton(). + getClientFor(ocAccount, getContext()); } protected OwnCloudClient getClient() {