0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-20 20:03:06 +02:00

Reset flash flag when camera is closed

Closing the camera will also shut off the flash.

This fixes the bug that when you scan a barcode with the flash on and
immediately go back (to the previous instance of CameraActivity), the
flash flag will still be true when the flash is off.

Fix for https://github.com/markusfisch/BinaryEye/issues/101
This commit is contained in:
Markus Fisch 2020-03-19 18:04:23 +01:00
parent 8e24673d08
commit b640fa1372

View File

@ -144,6 +144,8 @@ class CameraActivity : AppCompatActivity() {
private fun closeCamera() {
cameraView.close()
// closing the camera will also shut off the flash
flash = false
}
override fun onRestoreInstanceState(savedState: Bundle) {