mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
hide the Flashlight toggle button if no flash is available
This commit is contained in:
@ -258,6 +258,8 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||
mIsFlashSupported = characteristics.get(CameraCharacteristics.FLASH_INFO_AVAILABLE) ?: false
|
||||
mIsZoomSupported = characteristics.get(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM) ?: 0f > 0f
|
||||
mIsFocusSupported = characteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES).size > 1
|
||||
|
||||
mActivity.setFlashAvailable(mIsFlashSupported)
|
||||
mCameraId = cameraId
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user