Эх сурвалжийг харах

Set DAV path in AccountUtils and retrieve it when calling DAVdroid

justin-sleep 8 жил өмнө
parent
commit
b5ca2cdc90

+ 1 - 0
src/com/owncloud/android/authentication/AccountUtils.java

@@ -40,6 +40,7 @@ public class AccountUtils {
     private static final String TAG = AccountUtils.class.getSimpleName();
     private static final String TAG = AccountUtils.class.getSimpleName();
 
 
     public static final String WEBDAV_PATH_4_0_AND_LATER = "/remote.php/webdav";
     public static final String WEBDAV_PATH_4_0_AND_LATER = "/remote.php/webdav";
+    public static final String DAV_PATH = "/remote.php/dav";
     private static final String ODAV_PATH = "/remote.php/odav";
     private static final String ODAV_PATH = "/remote.php/odav";
     private static final String SAML_SSO_PATH = "/remote.php/webdav";
     private static final String SAML_SSO_PATH = "/remote.php/webdav";
     public static final String STATUS_PATH = "/status.php";
     public static final String STATUS_PATH = "/status.php";

+ 1 - 3
src/com/owncloud/android/ui/activity/Preferences.java

@@ -476,9 +476,7 @@ public class Preferences extends PreferenceActivity
         if (getPackageManager().resolveActivity(davDroidLoginIntent, 0) != null) {
         if (getPackageManager().resolveActivity(davDroidLoginIntent, 0) != null) {
             // arguments
             // arguments
             if (mUri != null) {
             if (mUri != null) {
-                davDroidLoginIntent.putExtra("url", mUri.toString()
-                        + AccountUtils.getWebdavPath(AccountUtils.getServerVersion(account), MainApp.getAuthTokenType())
-                        );
+                davDroidLoginIntent.putExtra("url", mUri.toString() + AccountUtils.DAV_PATH);
             }
             }
             davDroidLoginIntent.putExtra("username", AccountUtils.getAccountUsername(account.name));
             davDroidLoginIntent.putExtra("username", AccountUtils.getAccountUsername(account.name));
             //loginIntent.putExtra("password", "...");
             //loginIntent.putExtra("password", "...");