Skip to content

Commit 18c8bf3

Browse files
committed
Fix error state for stroboscope and SOS
1 parent b0ea8d8 commit 18c8bf3

File tree

1 file changed

+2
-2
lines changed
  • app/src/main/kotlin/com/simplemobiletools/flashlight/helpers

1 file changed

+2
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ class MyCameraImpl private constructor(private val context: Context, private var
272272
handleCameraSetup()
273273
while (!shouldStroboscopeStop) {
274274
try {
275-
cameraFlash.runOrToast {
275+
cameraFlash!!.run {
276276
toggleFlashlight(true)
277277
}
278278
val onDuration = if (isStroboSOS) SOS[sosIndex++ % SOS.size] else stroboFrequency
279279
Thread.sleep(onDuration)
280-
cameraFlash.runOrToast {
280+
cameraFlash!!.run {
281281
toggleFlashlight(false)
282282
}
283283
val offDuration = if (isStroboSOS) SOS[sosIndex++ % SOS.size] else stroboFrequency

0 commit comments

Comments
 (0)