Hide incorrect "Factory data reset" message

This commit is contained in:
vvb2060 2022-03-24 00:10:54 +08:00 committed by John Wu
parent cd1edc5d56
commit 5512917ec1

View File

@ -8,6 +8,10 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
fun reboot(reason: String = if (Config.recovery) "recovery" else "") {
if (reason == "recovery") {
// KEYCODE_POWER = 26, hide incorrect "Factory data reset" message
Shell.cmd("/system/bin/input keyevent 26").submit()
}
Shell.cmd("/system/bin/svc power reboot $reason || /system/bin/reboot $reason").submit()
}