private void notifyActivityStateChanged(Bundle bundle){
  if (!mRecords.isEmpty()) {
    Log.d(TAG,"notifyActivityStatusChanged:clients = " + mRecords.size());
synchronized (mRecords) {
      Iterator<Record> iterator=mRecords.iterator();
      while (iterator.hasNext()) {
        Record record=(Record)iterator.next();
        FmRadioListener listener=record.mCallback;
        if (listener == null) {
          iterator.remove();
          return;
        }
        listener.onCallBack(bundle);
      }
    }
  }
}

private void notifyActivityStateChanged ( Bundle bundle ) { if ( ! mRecords . isEmpty ( ) ) { Log . d ( TAG , "notifyActivityStatusChanged:clients = " + mRecords . size ( ) ) ; synchronized ( mRecords ) { Iterator < Record > iterator = mRecords . iterator ( ) ; while ( iterator . hasNext ( ) ) { Record record = ( Record ) iterator . next ( ) ; FmRadioListener listener = record . mCallback ; if ( listener == null ) { iterator . remove ( ) ; return ; } listener . onCallBack ( bundle ) ; } } } }
call back from service to activity
