This commit is contained in:
lucky 2022-01-21 15:26:42 +03:00
parent e9987d31e9
commit 0fd61a8bf4
2 changed files with 5 additions and 3 deletions

View File

@ -18,8 +18,8 @@ import me.lucky.wasted.databinding.ActivityMainBinding
open class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private val prefs by lazy { Preferences(this) }
private val admin by lazy { DeviceAdminManager(this) }
private lateinit var prefs: Preferences
private lateinit var admin: DeviceAdminManager
private val shortcut by lazy { ShortcutManager(this) }
private val job by lazy { WipeJobManager(this) }
@ -54,6 +54,8 @@ open class MainActivity : AppCompatActivity() {
}
private fun init() {
prefs = Preferences(this)
admin = DeviceAdminManager(this)
AppNotificationManager(this).createNotificationChannels()
if (prefs.code == "") prefs.code = makeCode()
updateCodeColorState()

View File

@ -82,5 +82,5 @@ enum class Launcher(val flag: Int) {
PANIC_KIT(1),
TILE(1 shl 1),
SHORTCUT(1 shl 2),
BROADCAST(1 shl 3)
BROADCAST(1 shl 3),
}