From 7f7491fde49efe0d48b11b8c8ae2523065edf985 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Fri, 12 Jul 2013 14:00:19 +0300 Subject: Update wipe data option confirmation This commit allows the wipe data/factory reset option to recognize the .one_confirm or .no_confirm files in the clockworkmod folder. Signed-off-by: Michael Bestas Change-Id: Ib0f82b4448e3b9df95a5e59a49428f3e9da58578 --- recovery.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/recovery.c b/recovery.c index 8cfaa73..6f8edf6 100644 --- a/recovery.c +++ b/recovery.c @@ -637,35 +637,8 @@ update_directory(const char* path, const char* unmount_when_done) { static void wipe_data(int confirm) { - if (confirm) { - static char** title_headers = NULL; - - if (title_headers == NULL) { - char* headers[] = { "Confirm wipe of all user data?", - " THIS CAN NOT BE UNDONE.", - "", - NULL }; - title_headers = prepend_title((const char**)headers); - } - - char* items[] = { " No", - " No", - " No", - " No", - " No", - " No", - " No", - " Yes -- delete all user data", // [7] - " No", - " No", - " No", - NULL }; - - int chosen_item = get_menu_selection(title_headers, items, 1, 0); - if (chosen_item != 7) { - return; - } - } + if (confirm && !confirm_selection( "Confirm wipe of all user data?", "Yes - Wipe all user data")) + return; ui_print("\n-- Wiping data...\n"); device_wipe_data(); -- cgit v1.1