mirror of
https://github.com/CTCaer/CTCaer-CWM.git
synced 2024-11-23 09:59:45 +00:00
Remove power off and replace it with full reboot options
- reboot to recovery - reboot to bootloader - reboot system now - Power off
This commit is contained in:
parent
5c7fb2e3d3
commit
ff8508f635
47
recovery.c
47
recovery.c
@ -700,8 +700,51 @@ prompt_and_wait() {
|
||||
int status;
|
||||
switch (chosen_item) {
|
||||
case ITEM_REBOOT:
|
||||
poweroff=0;
|
||||
return;
|
||||
{
|
||||
|
||||
static char* headers[] = { "Reboot Options",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
||||
static char* list[] = { "Reboot System Now",
|
||||
"Reboot Recovery",
|
||||
"Reboot into Fastboot Mode",
|
||||
"Power Off",
|
||||
NULL
|
||||
};
|
||||
|
||||
int chosen_item = get_menu_selection(headers, list, 0, 0);
|
||||
switch (chosen_item)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ui_print("Rebooting Device...\n");
|
||||
poweroff = 0;
|
||||
return;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ui_print("Rebooting to Recovery...\n");
|
||||
__system("reboot recovery");
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ui_print("Rebooting to Bootloader...\n");
|
||||
__system("reboot bootloader");
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ui_print("Shutting Down...\n");
|
||||
poweroff = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case ITEM_WIPE_DATA:
|
||||
wipe_data(ui_text_visible());
|
||||
|
Loading…
Reference in New Issue
Block a user