Cannot connect to camera service when using ACTION_IMAGE_CAPTURE
<p>I'm using the following code to tell the system I want to take a picture:</p>

<pre><code>            Intent intent = new Intent(
                    android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null);
            intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri
                    .fromFile(new File(filePath)));
            startActivityForResult(intent, TAKE_PHOTO_ACTIVITY);
</code></pre>

<p>It works like a champ, the first time.  Subsequent tries yield the following exception:</p>

<blockquote>
  <p>E/CameraHolder( 8300):
  java.lang.RuntimeException: Fail to
  connect to camera service
  E/CameraHolder( 8300):    at
  android.hardware.Camera.native_setup(Native
  Method) E/CameraHolder( 8300):    at
  android.hardware.Camera.(Camera.java:110)
  E/CameraHolder( 8300):    at
  android.hardware.Camera.open(Camera.java:90)
  E/CameraHolder( 8300):    at
  com.android.camera.CameraHolder.open(CameraHolder.java:100)
  E/CameraHolder( 8300):    at
  com.android.camera.Camera.ensureCameraDevice(Camera.java:1626)
  E/CameraHolder( 8300):    at
  com.android.camera.Camera.startPreview(Camera.java:1686)
  E/CameraHolder( 8300):    at
  com.android.camera.Camera.access$5800(Camera.java:94)
  E/CameraHolder( 8300):    at
  com.android.camera.Camera$5.run(Camera.java:949)
  E/CameraHolder( 8300):    at
  java.lang.Thread.run(Thread.java:1096)</p>
</blockquote>

<p>I imagine I have to somehow release the camera object, but since I'm not directly acquiring it, I have no idea how to do this.  Can someone help me out?</p>
