protected WebdavClient getClient() throws OperationCanceledException,\r
AuthenticatorException, IOException {\r
if (mClient == null) {\r
- String username = getAccount().name.split("@")[0];\r
- String password = this.getAccountManager().blockingGetAuthToken(\r
- getAccount(), AccountAuthenticator.AUTH_TOKEN_TYPE, true);\r
if (this.getAccountManager().getUserData(getAccount(),\r
AccountAuthenticator.KEY_OC_URL) == null) {\r
throw new UnknownHostException();\r
}\r
- Uri uri = getUri();\r
-\r
- mClient = new WebdavClient(uri);\r
- mClient.setCredentials(username, password);\r
- mClient.allowSelfsignedCertificates();\r
+ mClient = new WebdavClient(account, getContext());\r
// mHost = mClient.getTargetHost();\r
}\r
\r