X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/11b88e0fccfdc94dd30f44b70361219d759648ac..a8fade7369bc8d1752dc4ba5fe07935cac84e96f:/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 8309fab4..e9f7a9b6 100644 --- a/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java @@ -1,10 +1,10 @@ /* ownCloud Android client application * Copyright (C) 2011 Bartek Przybylski + * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,7 +28,8 @@ import org.apache.http.client.ClientProtocolException; import org.apache.http.conn.ConnectionKeepAliveStrategy; import org.apache.http.protocol.HttpContext; -import com.owncloud.android.AccountUtils; +import com.owncloud.android.authentication.AccountUtils; +import com.owncloud.android.authentication.AccountUtils.AccountNotFoundException; import com.owncloud.android.datamodel.DataStorageManager; import com.owncloud.android.network.OwnCloudClientUtils; @@ -142,10 +143,8 @@ public abstract class AbstractOwnCloudSyncAdapter extends return null; } - protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException { - if (AccountUtils.constructFullURLForAccount(getContext(), account) == null) { - throw new UnknownHostException(); - } + protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException { + AccountUtils.constructFullURLForAccount(getContext(), account); mClient = OwnCloudClientUtils.createOwnCloudClient(account, getContext()); }