working advanced menus
This commit is contained in:
parent
16f0b49bea
commit
a496b51a83
@ -593,4 +593,40 @@ void show_nandroid_menu()
|
||||
show_nandroid_restore_menu();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void show_advanced_menu()
|
||||
{
|
||||
static char* headers[] = { "Advanced and Debugging Menu",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
||||
static char* list[] = { "Key Test",
|
||||
NULL
|
||||
};
|
||||
|
||||
for (;;)
|
||||
{
|
||||
int chosen_item = get_menu_selection(headers, list, 0);
|
||||
if (chosen_item == GO_BACK)
|
||||
break;
|
||||
switch (chosen_item)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ui_print("Outputting key codes.\n");
|
||||
ui_print("Go back to end debugging.\n");
|
||||
int key;
|
||||
int action;
|
||||
do
|
||||
{
|
||||
key = ui_wait_key();
|
||||
action = device_handle_key(key, 1);
|
||||
ui_print("Key: %d\n", key);
|
||||
}
|
||||
while (action != GO_BACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -33,3 +33,6 @@ install_zip(const char* packagefilepath);
|
||||
|
||||
int
|
||||
__system(const char *command);
|
||||
|
||||
void
|
||||
show_advanced_menu();
|
||||
|
11
recovery.c
11
recovery.c
@ -451,16 +451,9 @@ prompt_and_wait()
|
||||
case ITEM_PARTITION:
|
||||
show_partition_menu();
|
||||
break;
|
||||
/*
|
||||
case ITEM_MOUNT_SDCARD:
|
||||
if (ensure_root_path_mounted("SDCARD:") != 0) {
|
||||
LOGE ("Can't mount /sdcard\n");
|
||||
}
|
||||
case ITEM_ADVANCED:
|
||||
show_advanced_menu();
|
||||
break;
|
||||
case ITEM_MOUNT_USB:
|
||||
do_mount_usb_storage();
|
||||
break;
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ int device_wipe_data();
|
||||
#define ITEM_INSTALL_ZIP 4
|
||||
#define ITEM_NANDROID 5
|
||||
#define ITEM_PARTITION 6
|
||||
#define ITEM_ADVANCED 7
|
||||
|
||||
// Header text to display above the main menu.
|
||||
extern char* MENU_HEADERS[];
|
||||
|
Loading…
Reference in New Issue
Block a user