summaryrefslogtreecommitdiffstats
path: root/device.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-06-11 00:58:00 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-11 00:58:00 +0200
commit07069f080e8c5888452b12b4676bd70b1231200d (patch)
treefcfc300d139ccddd9de4219453358f39e9f5e9b2 /device.h
parentam a66cdf40: am 915fc970: am 280cb6e9: Merge "Zero blocks before BLKDISCARD" (diff)
parentam e21ff08e: am a1009c34: Merge "Split WipeData into PreWipeData and PostWipeData." (diff)
downloadandroid_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar.gz
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar.bz2
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar.lz
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar.xz
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.tar.zst
android_bootable_recovery-07069f080e8c5888452b12b4676bd70b1231200d.zip
Diffstat (limited to 'device.h')
-rw-r--r--device.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/device.h b/device.h
index dad8ccd56..f74b6b047 100644
--- a/device.h
+++ b/device.h
@@ -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_;