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");
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();
}
+ 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.