mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
dc4e2b6ccf
commit
0b5933ef28
|
@ -210,7 +210,7 @@ open class MainActivity : AppCompatActivity() {
|
|||
setPanicKitState(launchers.and(Launcher.PANIC_KIT.flag) != 0)
|
||||
setTileState(launchers.and(Launcher.TILE.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 {
|
||||
setPanicKitState(false)
|
||||
setTileState(false)
|
||||
|
|
|
@ -43,7 +43,7 @@ class Preferences(ctx: Context) {
|
|||
var launchers: Int
|
||||
get() = prefs.getInt(
|
||||
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) }
|
||||
|
||||
|
@ -82,5 +82,5 @@ enum class Launcher(val flag: Int) {
|
|||
PANIC_KIT(1),
|
||||
TILE(1 shl 1),
|
||||
SHORTCUT(1 shl 2),
|
||||
CODE(1 shl 3)
|
||||
BROADCAST(1 shl 3)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue