summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-10-24 05:11:46 +0200
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-10-24 05:11:46 +0200
commit36c6222be4084180e7dc5a9ff3283c86fdcdc3a7 (patch)
treea911f5de7d3972133283298037554308d5ad5c0d /wear_ui.cpp
parentSnap for 5082210 from 3d5a941b0b1671c3ccc3dd25faa2cd7de738b0b0 to qt-release (diff)
parentMerge "Add a function to construct the GRSurface in test" am: ee9c65a38e am: e100c9f491 (diff)
downloadandroid_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar.gz
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar.bz2
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar.lz
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar.xz
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.tar.zst
android_bootable_recovery-36c6222be4084180e7dc5a9ff3283c86fdcdc3a7.zip
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index 8f3bc7bbe..0611f94c9 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -95,13 +95,14 @@ void WearRecoveryUI::update_progress_locked() {
void WearRecoveryUI::SetStage(int /* current */, int /* max */) {}
-void WearRecoveryUI::StartMenu(const std::vector<std::string>& headers,
- const std::vector<std::string>& items, size_t initial_selection) {
- std::lock_guard<std::mutex> lg(updateMutex);
+std::unique_ptr<Menu> WearRecoveryUI::CreateMenu(const std::vector<std::string>& text_headers,
+ const std::vector<std::string>& text_items,
+ size_t initial_selection) const {
if (text_rows_ > 0 && text_cols_ > 0) {
- menu_ = std::make_unique<TextMenu>(scrollable_menu_, text_rows_ - menu_unusable_rows_ - 1,
- text_cols_ - 1, headers, items, initial_selection,
- char_height_, *this);
- update_screen_locked();
+ return std::make_unique<TextMenu>(scrollable_menu_, text_rows_ - menu_unusable_rows_ - 1,
+ text_cols_ - 1, text_headers, text_items, initial_selection,
+ char_height_, *this);
}
+
+ return nullptr;
}