summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 0262648f1..bf4b38247 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1095,8 +1095,17 @@ int TWPartitionManager::Factory_Reset(void) {
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
if ((*iter)->Wipe_During_Factory_Reset && (*iter)->Is_Present) {
- if (!(*iter)->Wipe())
- ret = false;
+#ifdef TW_OEM_BUILD
+ if ((*iter)->Mount_Point == "/data") {
+ if (!(*iter)->Wipe_Encryption())
+ ret = false;
+ } else {
+#endif
+ if (!(*iter)->Wipe())
+ ret = false;
+#ifdef TW_OEM_BUILD
+ }
+#endif
} else if ((*iter)->Has_Android_Secure) {
if (!(*iter)->Wipe_AndSec())
ret = false;