working advanced menus

This commit is contained in:
Koushik K. Dutta 2010-03-19 14:51:45 -07:00
parent 16f0b49bea
commit a496b51a83
4 changed files with 42 additions and 9 deletions

View File

@ -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);
}
}
}
}

View File

@ -33,3 +33,6 @@ install_zip(const char* packagefilepath);
int
__system(const char *command);
void
show_advanced_menu();

View File

@ -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;
*/
}
}
}

View File

@ -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[];