mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 07:57:39 +00:00
Use svc for reboot to recovery
This commit is contained in:
parent
4f52587586
commit
cd1edc5d56
@ -8,7 +8,6 @@ import android.widget.PopupMenu
|
|||||||
import androidx.core.content.getSystemService
|
import androidx.core.content.getSystemService
|
||||||
import com.topjohnwu.magisk.R
|
import com.topjohnwu.magisk.R
|
||||||
import com.topjohnwu.magisk.core.base.BaseActivity
|
import com.topjohnwu.magisk.core.base.BaseActivity
|
||||||
import com.topjohnwu.superuser.Shell
|
|
||||||
import com.topjohnwu.magisk.ktx.reboot as systemReboot
|
import com.topjohnwu.magisk.ktx.reboot as systemReboot
|
||||||
|
|
||||||
object RebootEvent {
|
object RebootEvent {
|
||||||
@ -20,7 +19,7 @@ object RebootEvent {
|
|||||||
R.id.action_reboot_bootloader -> systemReboot("bootloader")
|
R.id.action_reboot_bootloader -> systemReboot("bootloader")
|
||||||
R.id.action_reboot_download -> systemReboot("download")
|
R.id.action_reboot_download -> systemReboot("download")
|
||||||
R.id.action_reboot_edl -> systemReboot("edl")
|
R.id.action_reboot_edl -> systemReboot("edl")
|
||||||
R.id.action_reboot_recovery -> Shell.cmd("/system/bin/reboot recovery").submit()
|
R.id.action_reboot_recovery -> systemReboot("recovery")
|
||||||
else -> Unit
|
else -> Unit
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user