} finally {
synchronized(mPendingOperations) {
mPendingOperations.poll();
- mOperationResults.put(mCurrentOperation.hashCode(), result);
}
}
//sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
- callbackOperationListeners(mLastTarget, mCurrentOperation, result);
+ dispatchOperationListeners(mLastTarget, mCurrentOperation, result);
}
}
* @param operation Finished operation.
* @param result Result of the operation.
*/
- private void callbackOperationListeners(
+ private void dispatchOperationListeners(
Target target, final RemoteOperation operation, final RemoteOperationResult result) {
int count = 0;
Iterator<OnRemoteOperationListener> listeners = mBinder.mBoundListeners.keySet().iterator();
count += 1;
}
}
+ if (count == 0) {
+ mOperationResults.put(operation.hashCode(), result);
+ }
Log_OC.d(TAG, "Called " + count + " listeners");
}