X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/eafaf80dd49523b5240cf964133699252c06e66f..1551a5280afc682baf84582c150b3a9a4e47f219:/src/com/owncloud/android/files/FileOperationsHelper.java?ds=inline diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index 46588114..5e6741bb 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -119,7 +119,7 @@ public class FileOperationsHelper { } - public void shareFileWithLinkToApp(OCFile file, Intent sendIntent) { + public void shareFileWithLinkToApp(OCFile file, String password, Intent sendIntent) { if (file != null) { mFileActivity.showLoadingDialog(); @@ -128,6 +128,7 @@ public class FileOperationsHelper { service.setAction(OperationsService.ACTION_CREATE_SHARE); 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_SEND_INTENT, sendIntent); mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service); @@ -315,5 +316,17 @@ public class FileOperationsHelper { mWaitingForOpId = waitingForOpId; } - + /** + * @return 'True' if the server doesn't need to check forbidden characters + */ + public boolean isVersionWithForbiddenCharacters() { + if (mFileActivity.getAccount() != null) { + AccountManager accountManager = AccountManager.get(mFileActivity); + + String version = accountManager.getUserData(mFileActivity.getAccount(), + Constants.KEY_OC_VERSION); + return (new OwnCloudVersion(version)).isVersionWithForbiddenCharacters(); + } + return false; + } }