Remove all references to FDE enable wipe
Bug: 64766105
Test: FBE boots, forceencrypt boots, set pattern, reboots, encryptable
boots and can be encrypted
Change-Id: I8c6dc0acdc37c3a6f1bea28d5607ed8938a4eb0c
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 9d8b990..f7637fd 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -554,22 +554,12 @@
int32_t encryptionFlags) {
bool noUi = (encryptionFlags & VoldNativeService::ENCRYPTION_FLAG_NO_UI) != 0;
- std::string how;
- if ((encryptionFlags & VoldNativeService::ENCRYPTION_FLAG_IN_PLACE) != 0) {
- how = "inplace";
- } else if ((encryptionFlags & VoldNativeService::ENCRYPTION_FLAG_WIPE) != 0) {
- how = "wipe";
- } else {
- LOG(ERROR) << "Missing encryption flag";
- return -1;
- }
-
for (int tries = 0; tries < 2; ++tries) {
int rc;
if (passwordType == VoldNativeService::PASSWORD_TYPE_DEFAULT) {
- rc = cryptfs_enable_default(how.c_str(), noUi);
+ rc = cryptfs_enable_default(noUi);
} else {
- rc = cryptfs_enable(how.c_str(), passwordType, password.c_str(), noUi);
+ rc = cryptfs_enable(passwordType, password.c_str(), noUi);
}
if (rc == 0) {
@@ -591,9 +581,6 @@
if (passwordType != PASSWORD_TYPE_DEFAULT) {
return error("Unexpected password type");
}
- if (encryptionFlags != (ENCRYPTION_FLAG_IN_PLACE | ENCRYPTION_FLAG_NO_UI)) {
- return error("Unexpected flags");
- }
return translateBool(e4crypt_enable_crypto());
}