title: Fail to connect to camera service
body: <p>I had my camera set to <code>this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);</code> and it works fine but if I change it to <code>PORTRAIT</code> instead of <code>LANDSCAPE</code> then it crashes with the following error...</p>
  
  <pre><code>07-30 12:51:37.655: ERROR/AndroidRuntime(22069): FATAL EXCEPTION: main
  07-30 12:51:37.655: ERROR/AndroidRuntime(22069): java.lang.RuntimeException: Fail to connect to camera service
  07-30 12:51:37.655: ERROR/AndroidRuntime(22069):     at android.hardware.Camera.native_setup(Native Method)
  07-30 12:51:37.655: ERROR/AndroidRuntime(22069):     at android.hardware.Camera.&lt;init&gt;(Camera.java:110)
  07-30 12:51:37.655: ERROR/AndroidRuntime(22069):     at android.hardware.Camera.open(Camera.java:90)
  07-30 12:51:37.655: ERROR/AndroidRuntime(22069):     at org.digital.com.CamLayer.surfaceCreated(CamLayer.java:3
  </code></pre>
  
  <p>The method it crashes in is.. </p>
  
  <pre><code>public void surfaceCreated(SurfaceHolder holder) {
      synchronized(this) {
          mCamera = Camera.open();
  
          Camera.Parameters p = mCamera.getParameters(); 
          p.setPreviewSize(800, 480);
          mCamera.setParameters(p);
  
          try {
              mCamera.setPreviewDisplay(holder);
          } catch (IOException e) {
              Log.e("Camera", "mCamera.setPreviewDisplay(holder);");
          }
  
          mCamera.startPreview();
          mCamera.setPreviewCallback(this);
      }
  }
  </code></pre>
  
  <p>It crashes at <code>mCamera = Camera.open();</code></p>
  
  <p>My Manifest file has <code>&lt;uses-permission android:name="android.permission.CAMERA"&gt;&lt;/uses-permission&gt;</code></p>
  
  <p>How do I fix this so I can view my app in Portrait?</p>