From 8f64354d726d3404a80e07313b3016e044d5e01a Mon Sep 17 00:00:00 2001 From: masensio Date: Tue, 11 Jun 2013 10:46:21 +0200 Subject: [PATCH] OC-208: Changes from comments --- lint.xml | 3 +++ .../android/authentication/AuthenticatorActivity.java | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 lint.xml diff --git a/lint.xml b/lint.xml new file mode 100644 index 00000000..ee0eead5 --- /dev/null +++ b/lint.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 9ea2a627..1287a9cf 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -109,8 +109,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList public static final byte ACTION_CREATE = 0; public static final byte ACTION_UPDATE_TOKEN = 1; - - public static final String WEBDAV_PATH= "/remote.php/webdav"; private String mHostBaseUrl; private OwnCloudVersion mDiscoveredVersion; @@ -658,9 +656,13 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList private String trimUrlWebdav(String url){ - if(url.toLowerCase().endsWith(WEBDAV_PATH)){ - url = url.substring(0, url.length() - WEBDAV_PATH.length()); - } + if(url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_4_0)){ + url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_4_0.length()); + } else if(url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_2_0)){ + url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_2_0.length()); + } else if (url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_1_2)){ + url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_1_2.length()); + } return (url != null ? url : ""); } -- 2.11.0