We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdb1195 commit dc91665Copy full SHA for dc91665
app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt
@@ -4,6 +4,7 @@ import android.content.Context
4
import android.graphics.SurfaceTexture
5
import android.hardware.Camera
6
import android.os.Handler
7
+import com.simplemobiletools.commons.extensions.showErrorToast
8
import com.simplemobiletools.commons.extensions.toast
9
import com.simplemobiletools.commons.helpers.isMarshmallowPlus
10
import com.simplemobiletools.commons.helpers.isNougatPlus
@@ -197,6 +198,7 @@ class MyCameraImpl(val context: Context) {
197
198
try {
199
camera!!.startPreview()
200
} catch (e: Exception) {
201
+ context.showErrorToast(e)
202
disableFlashlight()
203
}
204
0 commit comments