From: masensio Date: Fri, 4 Apr 2014 10:57:25 +0000 (+0200) Subject: Grant Share and Unshare work properly. X-Git-Tag: oc-android-1.7.0_signed~345^2~10 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/46e949c826e736840a4b94793a5aa4c36ddb4c0f?ds=inline;hp=--cc Grant Share and Unshare work properly. --- 46e949c826e736840a4b94793a5aa4c36ddb4c0f diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index 5d500072..ff571e5d 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -115,7 +115,7 @@ public class FileOperationsHelper { service.putExtra(OperationsService.EXTRA_ACCOUNT, callerActivity.getAccount()); service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath()); service.putExtra(OperationsService.EXTRA_SEND_INTENT, sendIntent); - callerActivity.startService(service); + callerActivity.getOperationsServiceBinder().newOperation(service); } else { Log_OC.wtf(TAG, "Trying to open a NULL OCFile"); @@ -154,7 +154,7 @@ public class FileOperationsHelper { service.setAction(OperationsService.ACTION_UNSHARE); service.putExtra(OperationsService.EXTRA_ACCOUNT, callerActivity.getAccount()); service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath()); - callerActivity.startService(service); + callerActivity.getOperationsServiceBinder().newOperation(service); callerActivity.showLoadingDialog(); diff --git a/src/com/owncloud/android/ui/activity/FileActivity.java b/src/com/owncloud/android/ui/activity/FileActivity.java index c4dd28a2..49437303 100644 --- a/src/com/owncloud/android/ui/activity/FileActivity.java +++ b/src/com/owncloud/android/ui/activity/FileActivity.java @@ -306,6 +306,11 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp } + public OperationsServiceBinder getOperationsServiceBinder() { + return mOperationsServiceBinder; + } + + /** * Helper class handling a callback from the {@link AccountManager} after the creation of * a new ownCloud {@link Account} finished, successfully or not.