X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/52bd01bcedf1b8f13c49b67ee40a848bae1a9d40..eee74aa5f2f8533693c86d4aecf5b40f12a331bb:/src/com/owncloud/android/network/OwnCloudClientUtils.java diff --git a/src/com/owncloud/android/network/OwnCloudClientUtils.java b/src/com/owncloud/android/network/OwnCloudClientUtils.java index 5d852d87..04fb7ac6 100644 --- a/src/com/owncloud/android/network/OwnCloudClientUtils.java +++ b/src/com/owncloud/android/network/OwnCloudClientUtils.java @@ -36,8 +36,9 @@ import org.apache.commons.httpclient.protocol.Protocol; import org.apache.http.conn.ssl.BrowserCompatHostnameVerifier; import org.apache.http.conn.ssl.X509HostnameVerifier; -import com.owncloud.android.AccountUtils; import com.owncloud.android.authentication.AccountAuthenticator; +import com.owncloud.android.authentication.AccountUtils; +import com.owncloud.android.authentication.AccountUtils.AccountNotFoundException; import com.owncloud.android.Log_OC; import eu.alefzero.webdav.WebdavClient; @@ -83,8 +84,9 @@ public class OwnCloudClientUtils { * @throws AuthenticatorException If the authenticator failed to get the authorization token for the account. * @throws OperationCanceledException If the authenticator operation was cancelled while getting the authorization token for the account. * @throws IOException If there was some I/O error while getting the authorization token for the account. + * @throws AccountNotFoundException If 'account' is unknown for the AccountManager */ - public static WebdavClient createOwnCloudClient (Account account, Context appContext) throws OperationCanceledException, AuthenticatorException, IOException { + public static WebdavClient createOwnCloudClient (Account account, Context appContext) throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException { //Log_OC.d(TAG, "Creating WebdavClient associated to " + account.name); Uri uri = Uri.parse(AccountUtils.constructFullURLForAccount(appContext, account)); @@ -105,7 +107,7 @@ public class OwnCloudClientUtils { } - public static WebdavClient createOwnCloudClient (Account account, Context appContext, Activity currentActivity) throws OperationCanceledException, AuthenticatorException, IOException { + public static WebdavClient createOwnCloudClient (Account account, Context appContext, Activity currentActivity) throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException { Uri uri = Uri.parse(AccountUtils.constructFullURLForAccount(appContext, account)); WebdavClient client = createOwnCloudClient(uri, appContext); AccountManager am = AccountManager.get(appContext);