summaryrefslogtreecommitdiffstats
path: root/ui.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-04 02:10:54 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-05-04 02:10:54 +0200
commit96106592a2cebb78cc7d2772376cd1caf34ce9a1 (patch)
treeed48a00a97ba96e5388d1b3420ac425b81b35217 /ui.h
parentMerge "updater_sample: update tests" am: 219445a320 am: f3d1e58163 (diff)
parentMerge "Move menu headers/items to std::vector<std::string>." am: fb86bb2a07 (diff)
downloadandroid_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar.gz
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar.bz2
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar.lz
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar.xz
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.tar.zst
android_bootable_recovery-96106592a2cebb78cc7d2772376cd1caf34ce9a1.zip
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui.h b/ui.h
index c4689923a..35cc36e70 100644
--- a/ui.h
+++ b/ui.h
@@ -23,6 +23,7 @@
#include <functional>
#include <string>
+#include <vector>
// Abstract class for controlling the user interface during recovery.
class RecoveryUI {
@@ -139,10 +140,11 @@ class RecoveryUI {
// key_handler, which may be beyond the range of menu items. This could be used to trigger a
// device-specific action, even without that being listed in the menu. Caller needs to handle
// such a case accordingly (e.g. by calling Device::InvokeMenuItem() to process the action).
- // Returns a non-negative value (the chosen item number or device-specific action code), or -1 if
- // timed out waiting for input.
- virtual int ShowMenu(const char* const* headers, const char* const* items, int initial_selection,
- bool menu_only, const std::function<int(int, bool)>& key_handler) = 0;
+ // Returns a non-negative value (the chosen item number or device-specific action code), or
+ // static_cast<size_t>(-1) if timed out waiting for input.
+ virtual 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) = 0;
protected:
void EnqueueKey(int key_code);