diff options
author | Doug Zongker | 2014-04-01 11:45:24 -0500 |
---|---|---|
committer | Doug Zongker | 2014-04-01 11:47:36 -0500 |
commit | 02abde50851f66196c74d215150014f1378cb853 (patch) | |
tree | 53eaf66676eaad28448e105525505a8478ddf9e1 /default_device.cpp | |
parent | 276f37e4d4596ca2eeea801046d75ec10a702b78 (diff) | |
download | platform-bootable-recovery-02abde50851f66196c74d215150014f1378cb853.tar.gz platform-bootable-recovery-02abde50851f66196c74d215150014f1378cb853.tar.xz platform-bootable-recovery-02abde50851f66196c74d215150014f1378cb853.zip |
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 648eaec4..1f181318 100644 --- a/default_device.cpp +++ b/default_device.cpp | |||
@@ -31,20 +31,10 @@ static const char* ITEMS[] = {"reboot system now", | |||
31 | "wipe cache partition", | 31 | "wipe cache partition", |
32 | NULL }; | 32 | NULL }; |
33 | 33 | ||
34 | class DefaultUI : public ScreenRecoveryUI { | ||
35 | public: | ||
36 | virtual KeyAction CheckKey(int key) { | ||
37 | if (key == KEY_HOME) { | ||
38 | return TOGGLE; | ||
39 | } | ||
40 | return ENQUEUE; | ||
41 | } | ||
42 | }; | ||
43 | |||
44 | class DefaultDevice : public Device { | 34 | class DefaultDevice : public Device { |
45 | public: | 35 | public: |
46 | DefaultDevice() : | 36 | DefaultDevice() : |
47 | ui(new DefaultUI) { | 37 | ui(new ScreenRecoveryUI) { |
48 | } | 38 | } |
49 | 39 | ||
50 | RecoveryUI* GetUI() { return ui; } | 40 | RecoveryUI* GetUI() { return ui; } |
@@ -61,6 +51,7 @@ class DefaultDevice : public Device { | |||
61 | return kHighlightUp; | 51 | return kHighlightUp; |
62 | 52 | ||
63 | case KEY_ENTER: | 53 | case KEY_ENTER: |
54 | case KEY_POWER: | ||
64 | return kInvokeItem; | 55 | return kInvokeItem; |
65 | } | 56 | } |
66 | } | 57 | } |