public void broadcastStateChanged( ContactId contact, String sharingId, State state, ReasonCode reasonCode) { int rcsState = state.toInt(); int rcsReasonCode = reasonCode.toInt(); final int N = mVideoSharingListeners.beginBroadcast(); for (int i = 0; i < N; i++) { try { mVideoSharingListeners .getBroadcastItem(i) .onStateChanged(contact, sharingId, rcsState, rcsReasonCode); } catch (RemoteException e) { if (logger.isActivated()) { logger.error("Can't notify listener", e); } } } mVideoSharingListeners.finishBroadcast(); }