diff options
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 27 |
1 files changed, 20 insertions, 7 deletions
@@ -19,7 +19,9 @@ #include "ui.h" -class Device { +#define KEY_FLAG_ABS 0x8000 + +class Device : public VoldWatcher { public: Device(RecoveryUI* ui) : ui_(ui) { } virtual ~Device() { } @@ -59,15 +61,16 @@ class Device { enum BuiltinAction { NO_ACTION = 0, REBOOT = 1, - APPLY_SDCARD = 2, + APPLY_UPDATE = 2, // APPLY_CACHE was 3. - APPLY_ADB_SIDELOAD = 4, + // APPLY_ADB_SIDELOAD was 4. WIPE_DATA = 5, WIPE_CACHE = 6, - REBOOT_BOOTLOADER = 7, - SHUTDOWN = 8, - VIEW_RECOVERY_LOGS = 9, - MOUNT_SYSTEM = 10, + WIPE_MEDIA = 7, + REBOOT_BOOTLOADER = 8, + SHUTDOWN = 9, + VIEW_RECOVERY_LOGS = 10, + MOUNT_SYSTEM = 11, }; // Return the list of menu items (an array of strings, @@ -90,6 +93,8 @@ class Device { static const int kHighlightUp = -2; static const int kHighlightDown = -3; static const int kInvokeItem = -4; + static const int kGoBack = -5; + static const int kRefresh = -6; // Called before and after we do a wipe data/factory reset operation, // either via a reboot from the main system with the --wipe_data flag, @@ -102,6 +107,14 @@ class Device { virtual bool PreWipeData() { return true; } virtual bool PostWipeData() { return true; } + virtual bool PreWipeMedia() { return true; } + virtual bool PostWipeMedia() { return true; } + + // Called before reboot + virtual char const* GetRebootReason() { return ""; } + + virtual void onVolumeChanged() { ui_->onVolumeChanged(); } + private: RecoveryUI* ui_; }; |