aboutsummaryrefslogtreecommitdiffstats
path: root/ui.h
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2014-11-24 16:02:04 -0800
committerTom Marshall <tdm@cyngn.com>2015-11-25 15:34:31 -0800
commit3f092f7778ed608d454df4c3dc3b3f7cb4afde3b (patch)
tree326444388672880e6ab3bf72f434e13e1d80c25e /ui.h
parent383f723fdb0ebba5078ccc2aabf87f0516215bf9 (diff)
downloadbootable_recovery-3f092f7778ed608d454df4c3dc3b3f7cb4afde3b.zip
bootable_recovery-3f092f7778ed608d454df4c3dc3b3f7cb4afde3b.tar.gz
bootable_recovery-3f092f7778ed608d454df4c3dc3b3f7cb4afde3b.tar.bz2
recovery: Awakening of MiniVold
A minimal vold client for recovery. Change-Id: Id25d955dc1861a910e5f5fc27d9a19e245d66833
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui.h b/ui.h
index ca72911..48eeda8 100644
--- a/ui.h
+++ b/ui.h
@@ -21,6 +21,8 @@
#include <pthread.h>
#include <time.h>
+#include "voldclient.h"
+
// Abstract class for controlling the user interface during recovery.
class RecoveryUI {
public:
@@ -121,6 +123,9 @@ class RecoveryUI {
// statements will be displayed.
virtual void EndMenu() = 0;
+ // Notify of volume state change
+ void onVolumeChanged() { v_changed = 1; }
+
protected:
void EnqueueKey(int key_code);
@@ -135,6 +140,7 @@ private:
int key_down_count; // under key_queue_mutex
bool enable_reboot; // under key_queue_mutex
int rel_sum;
+ int v_changed;
int consecutive_power_keys;
int last_key;
@@ -159,6 +165,8 @@ private:
bool IsUsbConnected();
+ bool VolumesChanged();
+
static void* time_key_helper(void* cookie);
void time_key(int key_code, int count);
};