title: Custom camera displays wrong orientation
body: <p>I followed the guide on the Android developers website on how to make a custom camera but the orientation is 90 degrees off. When the camera is in landscape mode (turning left) it displays how it should - however, when it's in landscape after  turning right it displays the view upside down. </p>
  
  <p>I did some reading online and tried a few things but none of them seem to work. For example, I tried using mCamera.setDisplayOrientation(90), which works initially, but now it's 90 degrees off in landscape mode. Also, when I save the image it still saves it with the wrong orientation. </p>
  
  <p>I have included this in my AndroidManifest:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  </code></pre>
  
  <p>And this is the surfaceCreated() method that I'm using:</p>
  
  <pre><code>public void surfaceCreated(SurfaceHolder holder) {
          try {
              if(mCamera != null) {
                  mCamera.setPreviewDisplay(holder);
                  mCamera.startPreview();
              } else {
                  mCamera = Camera.open();
                  mCamera.startPreview();
              }
          } catch (IOException e) {
  
          }
      }
  </code></pre>
  
  <p>Does anybody know why this is happening? It seems like a lot of people have faced the same issue but I haven't had any luck fixing it so far. Really grateful for any help, thank you. </p>