- protected Uri getUri() {\r
- return Uri.parse(this.getAccountManager().getUserData(getAccount(),\r
- AccountAuthenticator.KEY_OC_URL));\r
- }\r
-\r
- protected WebdavClient getClient() throws OperationCanceledException,\r
- AuthenticatorException, IOException {\r
- if (mClient == null) {\r
- if (this.getAccountManager().getUserData(getAccount(),\r
- AccountAuthenticator.KEY_OC_URL) == null) {\r
- throw new UnknownHostException();\r
- }\r
- mClient = new WebdavClient(account, getContext());\r
- mClient.allowSelfsignedCertificates();\r
- // mHost = mClient.getTargetHost();\r
+ protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException {\r
+ if (AccountUtils.constructFullURLForAccount(getContext(), account) == null) {\r
+ throw new UnknownHostException();\r