aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@gmail.com>2013-07-12 14:00:19 +0300
committerMichael Bestas <mikeioannina@gmail.com>2013-07-14 23:16:57 +0300
commit7f7491fde49efe0d48b11b8c8ae2523065edf985 (patch)
treebd461bd39df5077edf6b0448aac357164063c0bb
parentcfb115f449a1905ffc8bd2a2bdfa2a322ee56f80 (diff)
downloadbootable_recovery-7f7491fde49efe0d48b11b8c8ae2523065edf985.zip
bootable_recovery-7f7491fde49efe0d48b11b8c8ae2523065edf985.tar.gz
bootable_recovery-7f7491fde49efe0d48b11b8c8ae2523065edf985.tar.bz2
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 <mikeioannina@gmail.com> Change-Id: Ib0f82b4448e3b9df95a5e59a49428f3e9da58578
-rw-r--r--recovery.c31
1 files 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();