Improvements to the installation UI

- No longer show irrelevant options to the user
- No longer require an additional button press to start installation
This commit is contained in:
topjohnwu
2020-08-24 04:04:52 -07:00
parent ccde8b73a2
commit e437ffdbae
8 changed files with 44 additions and 40 deletions
@@ -1,13 +1,13 @@
package com.topjohnwu.magisk.ktx
import android.content.Context
import com.topjohnwu.magisk.core.Config
import com.topjohnwu.magisk.core.Const
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.superuser.Shell
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
fun reboot(reason: String = if (Info.recovery) "recovery" else "") {
fun reboot(reason: String = if (Config.recovery) "recovery" else "") {
Shell.su("/system/bin/svc power reboot $reason || /system/bin/reboot $reason").submit()
}