From b1e63f0f140e9ef88e7bf19bfb266c95e4ae335d Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 24 Jun 2019 16:13:31 -0300 Subject: [PATCH] Manager: fix ModulesFragment reboot menu - correct 'booloader' typo breaking bootloader entry - remove extra bootloader entry Shell.su line which is unnecessary since it's covered by reboot() - revert to using `reboot recovery` for recovery entry since `svc power reboot recovery` triggers a very disconcerting "Factory data reset" reboot dialog on many devices - add Reboot to EDL mode option for good measure --- .../com/topjohnwu/magisk/ui/module/ModulesFragment.kt | 9 ++++++--- app/src/main/res/menu/menu_reboot.xml | 5 +++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.kt b/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.kt index 929afaf4d..02d2036c6 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.kt @@ -68,18 +68,21 @@ class ModulesFragment : MagiskFragment( return true } R.id.reboot_recovery -> { - reboot("recovery") + Shell.su("/system/bin/reboot recovery").submit() return true } R.id.reboot_bootloader -> { - reboot("booloader") - Shell.su("/system/bin/reboot bootloader").submit() + reboot("bootloader") return true } R.id.reboot_download -> { reboot("download") return true } + R.id.reboot_edl -> { + reboot("edl") + return true + } else -> return false } } diff --git a/app/src/main/res/menu/menu_reboot.xml b/app/src/main/res/menu/menu_reboot.xml index 5bf662aba..fe09fd480 100644 --- a/app/src/main/res/menu/menu_reboot.xml +++ b/app/src/main/res/menu/menu_reboot.xml @@ -22,4 +22,9 @@ android:title="@string/reboot_download" app:showAsAction="never" /> + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 76884a336..e34c43b60 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -44,6 +44,7 @@ Reboot to Recovery Reboot to Bootloader Reboot to Download + Reboot to EDL Update Available