diff options
author | Doug Zongker <dougz@android.com> | 2011-10-31 17:34:15 +0100 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2011-10-31 21:50:32 +0100 |
commit | 7d0542f28045640dfab6a259ae7bd796e653d66f (patch) | |
tree | 801e5acd7cb5a101182f325e1d4f343581b35801 /screen_ui.h | |
parent | refactor ui functions into a class (diff) | |
download | android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar.gz android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar.bz2 android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar.lz android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar.xz android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.tar.zst android_bootable_recovery-7d0542f28045640dfab6a259ae7bd796e653d66f.zip |
Diffstat (limited to 'screen_ui.h')
-rw-r--r-- | screen_ui.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/screen_ui.h b/screen_ui.h index 544f1543c..a5ec0d360 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -47,6 +47,10 @@ class ScreenRecoveryUI : public RecoveryUI { int WaitKey(); bool IsKeyPressed(int key); void FlushKeys(); + // The default implementation of CheckKey enqueues all keys. + // Devices should typically override this to provide some way to + // toggle the log/menu display, and to do an immediate reboot. + KeyAction CheckKey(int key); // printing messages void Print(const char* fmt, ...); // __attribute__((format(printf, 1, 2))); @@ -95,7 +99,8 @@ class ScreenRecoveryUI : public RecoveryUI { pthread_mutex_t key_queue_mutex; pthread_cond_t key_queue_cond; int key_queue[256], key_queue_len; - volatile char key_pressed[KEY_MAX + 1]; + char key_pressed[KEY_MAX + 1]; // under key_queue_mutex + int key_last_down; // under key_queue_mutex int rel_sum; pthread_t progress_t; @@ -110,6 +115,7 @@ class ScreenRecoveryUI : public RecoveryUI { void update_progress_locked(); static void* progress_thread(void* cookie); static int input_callback(int fd, short revents, void* data); + void process_key(int key_code, int updown); static void* input_thread(void* cookie); bool usb_connected(); |