diff options
author | Elliott Hughes <enh@google.com> | 2015-06-06 02:59:56 +0200 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-06-10 23:09:31 +0200 |
commit | 945548ef7b3eee5dbfb46f6291465d4b0b6d02e1 (patch) | |
tree | f047505165fdb3587dccc6e9f38017efa714b8ee /device.h | |
parent | Merge "recovery: Switch to clang" (diff) | |
download | android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.gz android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.bz2 android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.lz android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.xz android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.zst android_bootable_recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.zip |
Diffstat (limited to '')
-rw-r--r-- | device.h | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -91,13 +91,16 @@ class Device { static const int kHighlightDown = -3; static const int kInvokeItem = -4; - // Called when we do a wipe data/factory reset operation (either via a - // reboot from the main system with the --wipe_data flag, or when the - // user boots into recovery manually and selects the option from the - // menu.) Can perform whatever device-specific wiping actions are - // needed. Return 0 on success. The userdata and cache partitions - // are erased AFTER this returns (whether it returns success or not). - virtual int WipeData() { return 0; } + // 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, + // or when the user boots into recovery image manually and selects the + // option from the menu, to perform whatever device-specific wiping + // actions are needed. + // Return true on success; returning false from PreWipeData will prevent + // the regular wipe, and returning false from PostWipeData will cause + // the wipe to be considered a failure. + virtual bool PreWipeData() { return true; } + virtual bool PostWipeData() { return true; } private: RecoveryUI* ui_; |