From f21cd4ff49f60b2b7d13d8acf062ed97966a2a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 13 Oct 2023 11:33:02 +0200 Subject: [PATCH] Remove needless ArrayLists and `Arrays.toList` calls --- .../com/simplemobiletools/flashlight/activities/MainActivity.kt | 2 +- .../com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index 202a733..57d5afb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -405,7 +405,7 @@ class MainActivity : ComponentActivity() { val createNewContact = getBrightDisplayShortcut(appIconColor) try { - shortcutManager.dynamicShortcuts = Arrays.asList(createNewContact) + shortcutManager.dynamicShortcuts = listOf(createNewContact) preferences.lastHandledShortcutColor = appIconColor } catch (ignored: Exception) { } diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt index 8c40b43..9210b7d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt @@ -22,7 +22,7 @@ class MyCameraImpl private constructor(private val context: Context, private var var isFlashlightOn = false private var u = 200L // The length of one dit (Time unit) - private val SOS = arrayListOf(u, u, u, u, u, u * 3, u * 3, u, u * 3, u, u * 3, u * 3, u, u, u, u, u, u * 7) + private val SOS = listOf(u, u, u, u, u, u * 3, u * 3, u, u * 3, u, u * 3, u * 3, u, u, u, u, u, u * 7) private var shouldEnableFlashlight = false private var shouldEnableStroboscope = false