private void pauseCurrentTrack(){
  if (!isRecording() || isPaused()) {
    Log.d(TAG,"Ignore pauseCurrentTrack. Not recording or paused.");
    return;
  }
  recordingTrackPaused=true;
  PreferencesUtils.setBoolean(this,R.string.recording_track_paused_key,true);
  Track track=myTracksProviderUtils.getTrack(recordingTrackId);
  if (track != null) {
    insertLocation(track,lastLocation,getLastValidTrackPointInCurrentSegment(track.getId()));
    Location pause=new Location(LocationManager.GPS_PROVIDER);
    pause.setLongitude(0);
    pause.setLatitude(PAUSE_LATITUDE);
    pause.setTime(System.currentTimeMillis());
    insertLocation(track,pause,null);
  }
  endRecording(false,recordingTrackId);
}

private void pauseCurrentTrack ( ) { if ( ! isRecording ( ) || isPaused ( ) ) { Log . d ( TAG , "Ignore pauseCurrentTrack. Not recording or paused." ) ; return ; } recordingTrackPaused = true ; PreferencesUtils . setBoolean ( this , R . string . recording_track_paused_key , true ) ; Track track = myTracksProviderUtils . getTrack ( recordingTrackId ) ; if ( track != null ) { insertLocation ( track , lastLocation , getLastValidTrackPointInCurrentSegment ( track . getId ( ) ) ) ; Location pause = new Location ( LocationManager . GPS_PROVIDER ) ; pause . setLongitude ( 0 ) ; pause . setLatitude ( PAUSE_LATITUDE ) ; pause . setTime ( System . currentTimeMillis ( ) ) ; insertLocation ( track , pause , null ) ; } endRecording ( false , recordingTrackId ) ; }
pauses the current track .
