title: About getParameters failed (empty parameters)
body: <p>I'm trying a camera capture application with SurfaceView.</p>
  
  <p>The application's overview is</p>
  
  <ol>
  <li><p>It can detect Face in realtime (on camera view).</p></li>
  <li><p>It can store the movie.</p></li>
  </ol>
  
  <p>I'm using android.media.MediaRecord class for saving the movie.</p>
  
  <pre><code>myRecorder = new MediaRecorder();
  myRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); 
  myRecorder.setOutputFile(Environment.getExternalStorageDirectory() + "/Movies/sample.3gp");
  myRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
  myRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
  myRecorder.setVideoFrameRate(30); 
  myRecorder.setVideoSize(320, 240); 
  myRecorder.prepare(); 
  myRecorder.start();
  </code></pre>
  
  <p>after avobe step,RuntimeException occur in below step.(camera is android.hardware.Camera object)</p>
  
  <pre><code>@Override
  public void onPreviewFrame(byte[] data, Camera camera) {
      //Log.d(TAG, "onPreviewFrame: ");
  
      int width = camera.getParameters().getPreviewSize().width; &lt;--
      int height = camera.getParameters().getPreviewSize().height;
  
  
  03-22 22:54:09.134 27875-27875/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: wbcompany.co.jp.facedetector3, PID: 27875
                                                 java.lang.RuntimeException: getParameters failed (empty parameters)
                                                     at android.hardware.Camera.native_getParameters(Native Method)
                                                     at android.hardware.Camera.getParameters(Camera.java:2019)
                                                     at wbcompany.co.jp.facedetector3.CameraView.onPreviewFrame(CameraView.java:150)
                                                     at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1192)
                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                     at android.os.Looper.loop(Looper.java:154)
                                                     at android.app.ActivityThread.main(ActivityThread.java:6189)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
  </code></pre>
  
  <p>before calling 'myRecorder.start()',this Exception doesn't occur.</p>
  
  <p>I have no idea of this error's solution.
  Please give me the solution of this problem.</p>
  
  <p>My runtime enviroment:
   Android 7.0/ API level 24</p>