title: TimeoutException in MediaRecorder.finalize() after 10 seconds
body: <pre><code>stacktrace0=java.util.concurrent.TimeoutException:
  android.media.MediaRecorder.finalize() timed out after 10
  seconds
      at android.media.MediaRecorder.native_finalize(Native Method)
      at android.media.MediaRecorder.finalize(MediaRecorder.java:1200)
      at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
      at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
      at java.lang.Thread.run(Thread.java:841)
  
  if (isDirectoryExists) 
  {
  MediaRecorder recorder= new MediaRecorder();
  recorder.reset();
  recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
  recorder.setOutputFile(path);
  recorder.setMaxDuration(30*60*1000);
  
  if(recorder!=null)
  {
      recorder.prepare();
  }
  try
  {
      if(recorder!=null)
      {
          recorder.start();
          isRecordingStarted=true;
      }
  }
  catch (IllegalStateException ilse) 
  {
      try
      {
          if(recorder!=null)
          {
              recorder.prepare();
          }
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
      try
      {
          if(recorder!=null)
          {
              recorder.start();
          }
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Detail : This problem is mainly arrived in android 4.3
  when first time exception occur when we again going for prepare and start
  media recorder. this logic successfully work in 4.0..
  i dont understand why this exception occur.</p>