diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 09:35:10 +0200 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 09:35:10 +0200 |
commit | a8c2f0de0117b611c3dbb8d0940f74c36930088e (patch) | |
tree | 170927726db2cc51a077f8b6ca9d87ccf00d2848 /ui.h | |
parent | release-request-08461da0-a262-4ebb-8c32-784b60a151df-for-git_oc-mr1-release-4216972 snap-temp-L74000000086000437 (diff) | |
parent | Import translations. DO NOT MERGE (diff) | |
download | android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar.gz android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar.bz2 android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar.lz android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar.xz android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.tar.zst android_bootable_recovery-a8c2f0de0117b611c3dbb8d0940f74c36930088e.zip |
Diffstat (limited to '')
-rw-r--r-- | ui.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -82,6 +82,12 @@ class RecoveryUI { // otherwise. virtual bool HasThreeButtons(); + // Returns true if it has a power key. + virtual bool HasPowerKey() const; + + // Returns true if it supports touch inputs. + virtual bool HasTouchScreen() const; + // Erases any queued-up keys. virtual void FlushKeys(); @@ -129,7 +135,14 @@ class RecoveryUI { unsigned int brightness_normal_; unsigned int brightness_dimmed_; + // Whether we should listen for touch inputs (default: false). + bool touch_screen_allowed_; + private: + // The sensitivity when detecting a swipe. + const int kTouchLowThreshold; + const int kTouchHighThreshold; + // Key event input queue pthread_mutex_t key_queue_mutex; pthread_cond_t key_queue_cond; @@ -147,6 +160,17 @@ class RecoveryUI { bool has_power_key; bool has_up_key; bool has_down_key; + bool has_touch_screen; + + // Touch event related variables. See the comments in RecoveryUI::OnInputEvent(). + int touch_slot_; + int touch_X_; + int touch_Y_; + int touch_start_X_; + int touch_start_Y_; + bool touch_finger_down_; + bool touch_swiping_; + bool is_bootreason_recovery_ui_; struct key_timer_t { RecoveryUI* ui; @@ -157,6 +181,7 @@ class RecoveryUI { pthread_t input_thread_; void OnKeyDetected(int key_code); + void OnTouchDetected(int dx, int dy); int OnInputEvent(int fd, uint32_t epevents); void ProcessKey(int key_code, int updown); |