aboutsummaryrefslogtreecommitdiffstats
path: root/ui.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-04-01 09:45:24 -0700
committerDoug Zongker <dougz@android.com>2014-04-01 09:47:36 -0700
commit02abde50851f66196c74d215150014f1378cb853 (patch)
tree53eaf66676eaad28448e105525505a8478ddf9e1 /ui.cpp
parent276f37e4d4596ca2eeea801046d75ec10a702b78 (diff)
downloadbootable_recovery-02abde50851f66196c74d215150014f1378cb853.zip
bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.gz
bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.bz2
remove DefaultDevice's UI subclass
RecoveryUI (which is the superclass of ScreenRecoveryUI), provides a basic CheckKey method that is useful for devices that have KEY_POWER, KEY_VOLUMEUP, and KEY_VOLUMEDOWN. Stop overriding it with a less featureful method; with this no recovery UI customization is needed for most handheld devices (phones, tablets, etc.). Change-Id: I7d57cfaaef79afea8af4fc3dbc570afc61aeb5bc
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.cpp b/ui.cpp
index 67a2500..091012f 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -276,7 +276,7 @@ void RecoveryUI::FlushKeys() {
// - Press power seven times in a row to reboot.
// - Alternate vol-up and vol-down seven times to mount /system.
RecoveryUI::KeyAction RecoveryUI::CheckKey(int key) {
- if (IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) {
+ if ((IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) || key == KEY_HOME) {
return TOGGLE;
}