aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2015-06-05 19:59:56 -0500
committerElliott Hughes2015-06-10 16:09:31 -0500
commit945548ef7b3eee5dbfb46f6291465d4b0b6d02e1 (patch)
treef047505165fdb3587dccc6e9f38017efa714b8ee /device.h
parent3f9db6af3d8f8659637da7288e9e2bceda4366d0 (diff)
downloadplatform-bootable-recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.gz
platform-bootable-recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.tar.xz
platform-bootable-recovery-945548ef7b3eee5dbfb46f6291465d4b0b6d02e1.zip
Split WipeData into PreWipeData and PostWipeData.
Bug: http://b/21760064 Change-Id: Idde268fe4d7e27586ca4469de16783f1ffdc5069
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 dad8ccd5..f74b6b04 100644
--- a/device.h
+++ b/device.h
@@ -91,13 +91,16 @@ class Device {
91 static const int kHighlightDown = -3; 91 static const int kHighlightDown = -3;
92 static const int kInvokeItem = -4; 92 static const int kInvokeItem = -4;
93 93
94 // Called when we do a wipe data/factory reset operation (either via a 94 // Called before and after we do a wipe data/factory reset operation,
95 // reboot from the main system with the --wipe_data flag, or when the 95 // either via a reboot from the main system with the --wipe_data flag,
96 // user boots into recovery manually and selects the option from the 96 // or when the user boots into recovery image manually and selects the
97 // menu.) Can perform whatever device-specific wiping actions are 97 // option from the menu, to perform whatever device-specific wiping
98 // needed. Return 0 on success. The userdata and cache partitions 98 // actions are needed.
99 // are erased AFTER this returns (whether it returns success or not). 99 // Return true on success; returning false from PreWipeData will prevent
100 virtual int WipeData() { return 0; } 100 // the regular wipe, and returning false from PostWipeData will cause
101 // the wipe to be considered a failure.
102 virtual bool PreWipeData() { return true; }
103 virtual bool PostWipeData() { return true; }
101 104
102 private: 105 private:
103 RecoveryUI* ui_; 106 RecoveryUI* ui_;