Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 002548ed authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6643631 from 8776749e to rvc-release

Change-Id: I182b1f2cb84bef30e928209781e2835d5d1767cc
parents 0ef05db3 8776749e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -299,6 +299,13 @@ public class QrCamera extends Handler {
                        break;
                    }
                }
                if (mCamera == null && numberOfCameras > 0) {
                    Log.i(TAG, "Can't find back camera. Opening a different camera");
                    Camera.getCameraInfo(0, cameraInfo);
                    releaseCamera();
                    mCamera = Camera.open(0);
                    mCameraOrientation = cameraInfo.orientation;
                }
            } catch (RuntimeException e) {
                Log.e(TAG, "Fail to open camera: " + e);
                mCamera = null;
@@ -308,7 +315,7 @@ public class QrCamera extends Handler {

            try {
                if (mCamera == null) {
                    throw new IOException("Cannot find available back camera");
                    throw new IOException("Cannot find available camera");
                }
                mCamera.setPreviewTexture(surface);
                setCameraParameter();