OCShare share = (OCShare) result.getData().get(0);
// Update DB with the response
+ share.setPath(mPath);
if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
- share.setPath(mPath.substring(0, mPath.length()-1));
share.setIsFolder(true);
-
} else {
- share.setPath(mPath);
share.setIsFolder(false);
}
share.setPermissions(mPermissions);
}
mPendingOperations.add(new Pair<Target , RemoteOperation>(target, operation));
- sendBroadcastNewOperation(target, operation);
+ //sendBroadcastNewOperation(target, operation);
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
}
}
- sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
+ //sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
callbackOperationListeners(mLastTarget, mCurrentOperation, result);
}
}
@Override
protected void onStop() {
super.onStop();
- if (mOperationsServiceBinder != null) {
- mOperationsServiceBinder.removeOperationListener(this);
- mOperationsServiceBinder = null;
- }
}
@Override
protected void onDestroy() {
super.onDestroy();
- if (mOperationsServiceConnection != null)
+ if (mOperationsServiceConnection != null) {
+ if (mOperationsServiceBinder != null) {
+ mOperationsServiceBinder.removeOperationListener(this);
+ mOperationsServiceBinder = null;
+ }
unbindService(mOperationsServiceConnection);
+ }
}