adding some brackets at checking front/back camera
This commit is contained in:
parent
9dc29390f1
commit
594c024cd1
|
@ -309,7 +309,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||||
val characteristics = getCameraCharacteristics(cameraId)
|
val characteristics = getCameraCharacteristics(cameraId)
|
||||||
|
|
||||||
val facing = characteristics.get(CameraCharacteristics.LENS_FACING) ?: continue
|
val facing = characteristics.get(CameraCharacteristics.LENS_FACING) ?: continue
|
||||||
if ((mUseFrontCamera && facing == CameraCharacteristics.LENS_FACING_BACK) || !mUseFrontCamera && facing == CameraCharacteristics.LENS_FACING_FRONT) {
|
if ((mUseFrontCamera && facing == CameraCharacteristics.LENS_FACING_BACK) || (!mUseFrontCamera && facing == CameraCharacteristics.LENS_FACING_FRONT)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue