X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/a4ba6170ea7696e085b07adfef73eeb8b77cb8e2..eda724313028d60437c509d59fee7ebef8c6cfbf:/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 e8b1fcb2..8cb62343 100644 --- a/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java @@ -30,6 +30,7 @@ import org.apache.http.protocol.HttpContext; import com.owncloud.android.authenticator.AccountAuthenticator; import com.owncloud.android.datamodel.DataStorageManager; +import com.owncloud.android.network.OwnCloudClientUtils; import android.accounts.Account; import android.accounts.AccountManager; @@ -147,16 +148,14 @@ public abstract class AbstractOwnCloudSyncAdapter extends AccountAuthenticator.KEY_OC_URL)); } - protected WebdavClient getClient() throws OperationCanceledException, - AuthenticatorException, IOException { + protected WebdavClient getClient() throws /*OperationCanceledException, + AuthenticatorException,*/ IOException { if (mClient == null) { if (this.getAccountManager().getUserData(getAccount(), AccountAuthenticator.KEY_OC_URL) == null) { throw new UnknownHostException(); } - mClient = new WebdavClient(account, getContext()); - mClient.allowSelfsignedCertificates(); - // mHost = mClient.getTargetHost(); + mClient = OwnCloudClientUtils.createOwnCloudClient(account, getContext()); } return mClient;