fix: Fix wrong HDR error being thrown on LowLight mode
This commit is contained in:
parent
1e64215d37
commit
339b470ca5
@ -313,7 +313,11 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
|
|||||||
cameraSelector = extensionsManager!!.getExtensionEnabledCameraSelector(cameraProvider, cameraSelector, extension)
|
cameraSelector = extensionsManager!!.getExtensionEnabledCameraSelector(cameraProvider, cameraSelector, extension)
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "Extension $extension is not available for the given Camera!")
|
Log.e(TAG, "Extension $extension is not available for the given Camera!")
|
||||||
throw HdrNotContainedInFormatError()
|
throw when (extension) {
|
||||||
|
ExtensionMode.HDR -> HdrNotContainedInFormatError()
|
||||||
|
ExtensionMode.NIGHT -> LowLightBoostNotContainedInFormatError()
|
||||||
|
else -> Error("Invalid extension supplied! Extension $extension is not available.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user