@VisibleForTesting void onHandleIntent(Intent intent,ITrackRecordingService service){
  String action=intent.getAction();
  if (action != null) {
    try {
      if (action.equals(getString(R.string.track_action_start))) {
        service.startNewTrack();
      }
 else       if (action.equals(getString(R.string.track_action_end))) {
        service.endCurrentTrack();
      }
 else       if (action.equals(getString(R.string.track_action_pause))) {
        service.pauseCurrentTrack();
      }
 else       if (action.equals(getString(R.string.track_action_resume))) {
        service.resumeCurrentTrack();
      }
    }
 catch (    RemoteException e) {
      Log.d(TAG,"ControlRecordingService onHandleIntent RemoteException",e);
    }
  }
  unbindService(this);
  connected=false;
}

@ VisibleForTesting void onHandleIntent ( Intent intent , ITrackRecordingService service ) { String action = intent . getAction ( ) ; if ( action != null ) { try { if ( action . equals ( getString ( R . string . track_action_start ) ) ) { service . startNewTrack ( ) ; } else if ( action . equals ( getString ( R . string . track_action_end ) ) ) { service . endCurrentTrack ( ) ; } else if ( action . equals ( getString ( R . string . track_action_pause ) ) ) { service . pauseCurrentTrack ( ) ; } else if ( action . equals ( getString ( R . string . track_action_resume ) ) ) { service . resumeCurrentTrack ( ) ; } } catch ( RemoteException e ) { Log . d ( TAG , "ControlRecordingService onHandleIntent RemoteException" , e ) ; } } unbindService ( this ) ; connected = false ; }
handles the intent to start or stop a recording .
