mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-06-05 21:59:19 +02:00
fix(#165): fix flashlight status after coming back from camera app
This commit is contained in:
@ -198,6 +198,10 @@ class MainActivity : SimpleActivity() {
|
||||
brightness_bar.beVisibleIf(isEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTorchUnavailable() {
|
||||
mCameraImpl!!.onCameraNotAvailable()
|
||||
}
|
||||
})
|
||||
if (config.turnFlashlightOn) {
|
||||
mCameraImpl!!.enableFlashlight()
|
||||
@ -300,7 +304,7 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun changeIconColor(color: Int, imageView: ImageView?) {
|
||||
imageView!!.background.mutate().applyColorFilter(color)
|
||||
imageView!!.background.applyColorFilter(color)
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
|
Reference in New Issue
Block a user