Added operation to create shares with a sharee, separated from operation to create...
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / FileOperationsHelper.java
index 495d7a3..e27f84e 100644 (file)
@@ -172,7 +172,7 @@ public class FileOperationsHelper {
                     getString(R.string.wait_a_moment));
 
             Intent service = new Intent(mFileActivity, OperationsService.class);
                     getString(R.string.wait_a_moment));
 
             Intent service = new Intent(mFileActivity, OperationsService.class);
-            service.setAction(OperationsService.ACTION_CREATE_SHARE);
+            service.setAction(OperationsService.ACTION_CREATE_SHARE_VIA_LINK);
             service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
             service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
             service.putExtra(OperationsService.EXTRA_PASSWORD_SHARE, password);
             service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
             service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
             service.putExtra(OperationsService.EXTRA_PASSWORD_SHARE, password);
@@ -259,6 +259,18 @@ public class FileOperationsHelper {
 
     }
 
 
     }
 
+
+    /**
+     * @return 'True' if the server supports the Search Users API
+     */
+    public boolean isSearchUsersSupportedSupported() {
+        if (mFileActivity.getAccount() != null) {
+            OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mFileActivity.getAccount());
+            return (serverVersion != null && serverVersion.isSearchUsersSupported());
+        }
+        return false;
+    }
+
     public void sendDownloadedFile(OCFile file) {
         if (file != null) {
             String storagePath = file.getStoragePath();
     public void sendDownloadedFile(OCFile file) {
         if (file != null) {
             String storagePath = file.getStoragePath();