Add webdav url to DetectAuthenticationMethodOperation
[pub/Android/ownCloud.git] / src / com / owncloud / android / services / OperationsService.java
index bef03ad..0df160a 100644 (file)
@@ -1,5 +1,5 @@
 /* ownCloud Android client application
- *   Copyright (C) 2012-2013 ownCloud Inc.
+ *   Copyright (C) 2012-2014 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -59,6 +59,7 @@ public class OperationsService extends Service {
     public static final String EXTRA_REMOTE_PATH = "REMOTE_PATH";
     public static final String EXTRA_SEND_INTENT = "SEND_INTENT";
     public static final String EXTRA_RESULT = "RESULT";
+    public static final String EXTRA_WEBDAV_PATH = "WEBDAV_PATH";
     
     public static final String ACTION_CREATE_SHARE = "CREATE_SHARE";
     public static final String ACTION_UNSHARE = "UNSHARE";
@@ -136,7 +137,8 @@ public class OperationsService extends Service {
                     operation = new UnshareLinkOperation(remotePath, this.getApplicationContext());
                 }
             } else if (action.equals(ACTION_DETECT_AUTHENTICATION_METHOD)) { // Detect Authentication Method
-                operation = new DetectAuthenticationMethodOperation(this.getApplicationContext());
+                String webdav_url = serverUrl + intent.getStringExtra(EXTRA_WEBDAV_PATH);
+                operation = new DetectAuthenticationMethodOperation(this.getApplicationContext(), webdav_url);
             
             } else {
                 // nothing we are going to handle