diff options
author | Doug Zongker <dougz@android.com> | 2014-04-01 09:45:24 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2014-04-01 09:47:36 -0700 |
commit | 02abde50851f66196c74d215150014f1378cb853 (patch) | |
tree | 53eaf66676eaad28448e105525505a8478ddf9e1 /default_device.cpp | |
parent | 276f37e4d4596ca2eeea801046d75ec10a702b78 (diff) | |
download | bootable_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 'default_device.cpp')
-rw-r--r-- | default_device.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/default_device.cpp b/default_device.cpp index 648eaec..1f18131 100644 --- a/default_device.cpp +++ b/default_device.cpp @@ -31,20 +31,10 @@ static const char* ITEMS[] = {"reboot system now", "wipe cache partition", NULL }; -class DefaultUI : public ScreenRecoveryUI { - public: - virtual KeyAction CheckKey(int key) { - if (key == KEY_HOME) { - return TOGGLE; - } - return ENQUEUE; - } -}; - class DefaultDevice : public Device { public: DefaultDevice() : - ui(new DefaultUI) { + ui(new ScreenRecoveryUI) { } RecoveryUI* GetUI() { return ui; } @@ -61,6 +51,7 @@ class DefaultDevice : public Device { return kHighlightUp; case KEY_ENTER: + case KEY_POWER: return kInvokeItem; } } |