mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-21 10:08:30 +00:00
Hide incorrect "Factory data reset" message
This commit is contained in:
parent
cd1edc5d56
commit
5512917ec1
@ -8,6 +8,10 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
fun reboot(reason: String = if (Config.recovery) "recovery" else "") {
|
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()
|
Shell.cmd("/system/bin/svc power reboot $reason || /system/bin/reboot $reason").submit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user