code: public void pauseRecording(){
          if (currentAudioState.get()==RECORDING_STATE){
              currentAudioState.getAndSet(PAUSED_STATE);
              onTimeCompletedTimer.cancel();
              remainingMaxTimeInMillis=remainingMaxTimeInMillis-(System.currentTimeMillis()-recordingStartTimeMillis);
          }
          else{
              Log.w(TAG,"Audio recording is not recording");
          }
      }
docs: Pauses the recording if the recorder is in a recording state. Does nothing if in another state. Paused media recorder halts the max time countdown.