Auto-detect whether to use the long-press UI.

Change-Id: Ie77a5584e301467c6a5e164d2c62d6f036b2c0c0
diff --git a/ui.cpp b/ui.cpp
index 064890e..dbe5c51 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -278,6 +278,10 @@
     return result;
 }
 
+bool RecoveryUI::HasThreeButtons() {
+    return has_power_key && has_up_key && has_down_key;
+}
+
 void RecoveryUI::FlushKeys() {
     pthread_mutex_lock(&key_queue_mutex);
     key_queue_len = 0;
@@ -290,7 +294,7 @@
     pthread_mutex_unlock(&key_queue_mutex);
 
     // If we have power and volume up keys, that chord is the signal to toggle the text display.
-    if (has_power_key && has_up_key) {
+    if (HasThreeButtons()) {
         if (key == KEY_VOLUMEUP && IsKeyPressed(KEY_POWER)) {
             return TOGGLE;
         }