summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-04 01:13:09 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-04 01:13:09 +0200
commitfb86bb2a074cdec6d82e1df7304f1c41309ec220 (patch)
treee4a6d12bc2aca2b7b5cffbe213780ca894e31306 /wear_ui.cpp
parentMerge "updater_sample: update tests" (diff)
parentMove menu headers/items to std::vector<std::string>. (diff)
downloadandroid_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar.gz
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar.bz2
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar.lz
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar.xz
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.tar.zst
android_bootable_recovery-fb86bb2a074cdec6d82e1df7304f1c41309ec220.zip
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index d21f83542..f157d3ca3 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -20,6 +20,7 @@
#include <string.h>
#include <string>
+#include <vector>
#include <android-base/properties.h>
#include <android-base/strings.h>
@@ -88,13 +89,12 @@ void WearRecoveryUI::update_progress_locked() {
void WearRecoveryUI::SetStage(int /* current */, int /* max */) {}
-void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* items,
- int initial_selection) {
+void WearRecoveryUI::StartMenu(const std::vector<std::string>& headers,
+ const std::vector<std::string>& items, size_t initial_selection) {
pthread_mutex_lock(&updateMutex);
if (text_rows_ > 0 && text_cols_ > 0) {
menu_ = std::make_unique<Menu>(scrollable_menu_, text_rows_ - kMenuUnusableRows - 1,
text_cols_ - 1, headers, items, initial_selection);
-
update_screen_locked();
}
pthread_mutex_unlock(&updateMutex);