app: aboot: Using new function for unlock/lock menu
As a part of verified boot, it requires user to confirm whether
wipe user data when trying to unlock/lock the device.
Change-Id: I3e10bf06fe35f441d0551adce82e2693182304e7
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 11d64c4..31b5315 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2548,23 +2548,21 @@
}
/* status is true, it means to unlock device */
- if (status) {
- if(!is_allow_unlock) {
- fastboot_fail("oem unlock is not allowed");
- return;
- }
+ if (status && !is_allow_unlock) {
+ fastboot_fail("oem unlock is not allowed");
+ return;
+ }
#if FBCON_DISPLAY_MSG
- display_unlock_menu(type);
- fastboot_okay("");
- return;
+ display_unlock_menu(type, status);
+ fastboot_okay("");
+ return;
#else
- if (type == UNLOCK) {
- fastboot_fail("Need wipe userdata. Do 'fastboot oem unlock-go'");
- return;
- }
-#endif
+ if (status && type == UNLOCK) {
+ fastboot_fail("Need wipe userdata. Do 'fastboot oem unlock-go'");
+ return;
}
+#endif
set_device_unlock_value(type, status);