/* ownCloud Android client application\r
* Copyright (C) 2011 Bartek Przybylski\r
+ * Copyright (C) 2012-2013 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
+ * it under the terms of the GNU General Public License version 2,\r
+ * as published by the Free Software Foundation.\r
*\r
* This program is distributed in the hope that it will be useful,\r
* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
package com.owncloud.android.syncadapter;\r
\r
import java.io.IOException;\r
-import java.net.UnknownHostException;\r
import java.util.Date;\r
\r
import org.apache.http.HttpRequest;\r
import org.apache.http.conn.ConnectionKeepAliveStrategy;\r
import org.apache.http.protocol.HttpContext;\r
\r
-import com.owncloud.android.AccountUtils;\r
+import com.owncloud.android.authentication.AccountUtils;\r
+import com.owncloud.android.authentication.AccountUtils.AccountNotFoundException;\r
import com.owncloud.android.datamodel.DataStorageManager;\r
import com.owncloud.android.network.OwnCloudClientUtils;\r
\r
+\r
import android.accounts.Account;\r
import android.accounts.AccountManager;\r
import android.accounts.AuthenticatorException;\r
return null;\r
}\r
\r
- protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException {\r
- if (AccountUtils.constructFullURLForAccount(getContext(), account) == null) {\r
- throw new UnknownHostException();\r
- }\r
+ protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException {\r
+ AccountUtils.constructFullURLForAccount(getContext(), account);\r
mClient = OwnCloudClientUtils.createOwnCloudClient(account, getContext());\r
}\r
\r