aboutsummaryrefslogtreecommitdiffstats
path: root/ui.h
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2016-02-15 15:36:06 -0800
committerTom Marshall <tdm@cyngn.com>2016-03-07 15:16:25 -0800
commit6c20b00105e405823aa3ec12479e52cc30c0df9c (patch)
tree607a9223c74ea58e8d62bce4874ebc281846c134 /ui.h
parentd66f66eb72fc72c17d1a292cfbeaf2ec08721327 (diff)
downloadbootable_recovery-6c20b00105e405823aa3ec12479e52cc30c0df9c.zip
bootable_recovery-6c20b00105e405823aa3ec12479e52cc30c0df9c.tar.gz
bootable_recovery-6c20b00105e405823aa3ec12479e52cc30c0df9c.tar.bz2
recovery: Implement sysbar
Add a system bar (navigation bar) similar to the main Android system with back and home buttons. This makes it easier for users to figure out how to go back on devices that lack hardware buttons, and also provides a quick way to get back to the main menu. Note only buttons that do not have a hardware equivalent are shown, in order to prevent redundancy and confusion. Change-Id: I7538749978837571a8c250c3c8e54ac127b39d84
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui.h b/ui.h
index abe4bca..e71dbe2 100644
--- a/ui.h
+++ b/ui.h
@@ -162,6 +162,9 @@ class RecoveryUI {
// of phones and tablets, false otherwise.
virtual bool HasThreeButtons();
+ virtual bool HasBackKey() const { return has_back_key; }
+ virtual bool HasHomeKey() const { return has_home_key; }
+
// Erase any queued-up keys.
virtual void FlushKeys();
@@ -191,6 +194,10 @@ class RecoveryUI {
virtual int MenuItemStart() const = 0;
virtual int MenuItemHeight() const = 0;
+ virtual int GetSysbarHeight() = 0;
+ virtual int GetSysbarState() = 0;
+ virtual void SetSysbarState(int state) = 0;
+
// Display some header text followed by a menu of items, which appears
// at the top of the screen (in place of any scrolling ui_print()
// output, if necessary).
@@ -230,6 +237,8 @@ private:
bool has_power_key;
bool has_up_key;
bool has_down_key;
+ bool has_back_key;
+ bool has_home_key;
input_device input_devices[MAX_NR_INPUT_DEVICES];