title: While tyring to open front camera throws errors
body: <p>I am trying to open the front camera of an android device using following code which I borrowed from stackoverflow:</p>
  
  <pre><code>private android.hardware.Camera openFrontFacingCameraGingerbread() {
          int cameraCount = 0;
          Camera cam = null;
          android.hardware.Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
          cameraCount = Camera.getNumberOfCameras();
          for ( int camIdx = 0; camIdx &lt; cameraCount; camIdx++ ) {
              Camera.getCameraInfo( camIdx, cameraInfo );
              if ( cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT  ) {
                  try {
                      cam = Camera.open( camIdx );
                  } catch (RuntimeException e) {
  
                  }
  
                  cam.release();
              }
          }
  </code></pre>
  
  <p>This looks good I do not see any errors. I am calling this method from my MainActivity as soon as it loads. </p>
  
  <p>I do some "!" signs on my project icon in the project explorer but then I decided that let me go ahead and run. Let's see what happens. Now that I run it, I see following erros:</p>
  
  <p><img src="https://i.stack.imgur.com/hTiae.png" alt="Eclipse ADT errors"></p>
  
  <p>It says method called after release? release is the last thing that I am calling...</p>