aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-08-05 16:06:44 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-08-05 16:06:44 +0000
commitcaf0c8a6bf5eaa27cf36243965f7813ca2f0af13 (patch)
tree7a6e5a65029d5ed5f7135681b6c21f14f035338d
parent63ac2b8c3cc179546e0cd87ac06950a75dcbd9b5 (diff)
parent7f7491fde49efe0d48b11b8c8ae2523065edf985 (diff)
downloadbootable_recovery-caf0c8a6bf5eaa27cf36243965f7813ca2f0af13.zip
bootable_recovery-caf0c8a6bf5eaa27cf36243965f7813ca2f0af13.tar.gz
bootable_recovery-caf0c8a6bf5eaa27cf36243965f7813ca2f0af13.tar.bz2
Merge "Update wipe data option confirmation" into cm-10.1
-rw-r--r--recovery.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/recovery.c b/recovery.c
index 9e54147..60eb224 100644
--- a/recovery.c
+++ b/recovery.c
@@ -638,35 +638,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();