This commit is contained in:
lucky 2022-01-15 14:41:49 +03:00
parent dc4e2b6ccf
commit 0b5933ef28
2 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ open class MainActivity : AppCompatActivity() {
setPanicKitState(launchers.and(Launcher.PANIC_KIT.flag) != 0) setPanicKitState(launchers.and(Launcher.PANIC_KIT.flag) != 0)
setTileState(launchers.and(Launcher.TILE.flag) != 0) setTileState(launchers.and(Launcher.TILE.flag) != 0)
shortcut.setState(launchers.and(Launcher.SHORTCUT.flag) != 0) shortcut.setState(launchers.and(Launcher.SHORTCUT.flag) != 0)
setCodeReceiverState(launchers.and(Launcher.CODE.flag) != 0) setCodeReceiverState(launchers.and(Launcher.BROADCAST.flag) != 0)
} else { } else {
setPanicKitState(false) setPanicKitState(false)
setTileState(false) setTileState(false)

View File

@ -43,7 +43,7 @@ class Preferences(ctx: Context) {
var launchers: Int var launchers: Int
get() = prefs.getInt( get() = prefs.getInt(
LAUNCHERS, LAUNCHERS,
if (prefs.getBoolean(CODE_ENABLED, false)) Launcher.CODE.flag else 0, if (prefs.getBoolean(CODE_ENABLED, false)) Launcher.BROADCAST.flag else 0,
) )
set(value) = prefs.edit { putInt(LAUNCHERS, value) } set(value) = prefs.edit { putInt(LAUNCHERS, value) }
@ -82,5 +82,5 @@ enum class Launcher(val flag: Int) {
PANIC_KIT(1), PANIC_KIT(1),
TILE(1 shl 1), TILE(1 shl 1),
SHORTCUT(1 shl 2), SHORTCUT(1 shl 2),
CODE(1 shl 3) BROADCAST(1 shl 3)
} }