diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-08-26 16:01:59 +0200 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2015-08-26 22:36:16 +0200 |
commit | 89583ef00f54369be2b5ab3495495616056eba13 (patch) | |
tree | 94d0d7346abb12cbbb745d012f47036e97ab350a /partitionmanager.cpp | |
parent | Wipe crypto key when formatting data (diff) | |
download | android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar.gz android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar.bz2 android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar.lz android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar.xz android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.tar.zst android_bootable_recovery-89583ef00f54369be2b5ab3495495616056eba13.zip |
Diffstat (limited to '')
-rw-r--r-- | partitionmanager.cpp | 13 |
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; |