Move menu headers/items to std::vector<std::string>.
Test: mmma -j bootable/recovery
Test: Run recovery_unit_test on marlin.
Test: Build and boot into recovery image on angler. Check the UI that
shows menu ('View recovery log', 'Wipe data', 'Run locale test').
Test: Start recovery with '--prompt_and_wipe_data'. Check the UI.
Change-Id: If8a4209e0bb4ca64f719f9f9465d3b3589a69cdc
diff --git a/stub_ui.h b/stub_ui.h
index 362aab4..2ccd491 100644
--- a/stub_ui.h
+++ b/stub_ui.h
@@ -19,6 +19,7 @@
#include <functional>
#include <string>
+#include <vector>
#include "ui.h"
@@ -57,9 +58,10 @@
void ShowFile(const std::string& /* filename */) override {}
// menu display
- int ShowMenu(const char* const* /* headers */, const char* const* /* items */,
- int initial_selection, bool /* menu_only */,
- const std::function<int(int, bool)>& /* key_handler */) override {
+ size_t ShowMenu(const std::vector<std::string>& /* headers */,
+ const std::vector<std::string>& /* items */, size_t initial_selection,
+ bool /* menu_only */,
+ const std::function<int(int, bool)>& /* key_handler */) override {
return initial_selection;
}
};