mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
e9987d31e9
commit
0fd61a8bf4
|
@ -18,8 +18,8 @@ import me.lucky.wasted.databinding.ActivityMainBinding
|
||||||
|
|
||||||
open class MainActivity : AppCompatActivity() {
|
open class MainActivity : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityMainBinding
|
private lateinit var binding: ActivityMainBinding
|
||||||
private val prefs by lazy { Preferences(this) }
|
private lateinit var prefs: Preferences
|
||||||
private val admin by lazy { DeviceAdminManager(this) }
|
private lateinit var admin: DeviceAdminManager
|
||||||
private val shortcut by lazy { ShortcutManager(this) }
|
private val shortcut by lazy { ShortcutManager(this) }
|
||||||
private val job by lazy { WipeJobManager(this) }
|
private val job by lazy { WipeJobManager(this) }
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ open class MainActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init() {
|
private fun init() {
|
||||||
|
prefs = Preferences(this)
|
||||||
|
admin = DeviceAdminManager(this)
|
||||||
AppNotificationManager(this).createNotificationChannels()
|
AppNotificationManager(this).createNotificationChannels()
|
||||||
if (prefs.code == "") prefs.code = makeCode()
|
if (prefs.code == "") prefs.code = makeCode()
|
||||||
updateCodeColorState()
|
updateCodeColorState()
|
||||||
|
|
|
@ -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),
|
||||||
BROADCAST(1 shl 3)
|
BROADCAST(1 shl 3),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue