Remove FDE methods from binder interface
Now that none of these methods are used anymore, we can remove them.
Also remove the related constants.
Bug: 208476087
Change-Id: I1f56c8e05fb3fba09aab4bf5f8609b0f552b8999
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index f5fb908..ce6e6fc 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -550,110 +550,6 @@
return Ok();
}
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeCheckPassword(const std::string& password) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeCheckPassword is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeRestart() {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeRestart is no longer supported");
- return Ok();
-}
-
-// TODO(b/191796797) remove this once caller is removed
-#define CRYPTO_COMPLETE_NOT_ENCRYPTED 1
-binder::Status VoldNativeService::fdeComplete(int32_t* _aidl_return) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeComplete is no longer supported");
- *_aidl_return = CRYPTO_COMPLETE_NOT_ENCRYPTED;
- return Ok();
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeEnable(int32_t passwordType, const std::string& password,
- int32_t encryptionFlags) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeEnable is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeChangePassword(int32_t passwordType,
- const std::string& password) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeChangePassword is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeVerifyPassword(const std::string& password) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeVerifyPassword is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeGetField(const std::string& key, std::string* _aidl_return) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeGetField is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeSetField(const std::string& key, const std::string& value) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeSetField is no longer supported");
- return translate(-1);
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeGetPasswordType(int32_t* _aidl_return) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeGetPasswordType is no longer supported");
- *_aidl_return = -1;
- return Ok();
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeGetPassword(std::string* _aidl_return) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeGetPassword is no longer supported");
- return Ok();
-}
-
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::fdeClearPassword() {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("fdeClearPassword is no longer supported");
- return Ok();
-}
-
binder::Status VoldNativeService::fbeEnable() {
ENFORCE_SYSTEM_OR_ROOT;
ACQUIRE_CRYPT_LOCK;
@@ -661,15 +557,6 @@
return translateBool(fscrypt_initialize_systemwide_keys());
}
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::mountDefaultEncrypted() {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("mountDefaultEncrypted is no longer supported");
- return Ok();
-}
-
binder::Status VoldNativeService::initUser0() {
ENFORCE_SYSTEM_OR_ROOT;
ACQUIRE_CRYPT_LOCK;
@@ -677,16 +564,6 @@
return translateBool(fscrypt_init_user0());
}
-// TODO(b/191796797) remove this once caller is removed
-binder::Status VoldNativeService::isConvertibleToFbe(bool* _aidl_return) {
- ENFORCE_SYSTEM_OR_ROOT;
- ACQUIRE_CRYPT_LOCK;
-
- SLOGE("isConvertibleToFbe is no longer supported");
- *_aidl_return = false;
- return Ok();
-}
-
binder::Status VoldNativeService::mountFstab(const std::string& blkDevice,
const std::string& mountPoint) {
ENFORCE_SYSTEM_OR_ROOT;
diff --git a/VoldNativeService.h b/VoldNativeService.h
index 88fc9e7..cb42973 100644
--- a/VoldNativeService.h
+++ b/VoldNativeService.h
@@ -100,24 +100,9 @@
binder::Status openAppFuseFile(int32_t uid, int32_t mountId, int32_t fileId, int32_t flags,
android::base::unique_fd* _aidl_return);
- binder::Status fdeCheckPassword(const std::string& password);
- binder::Status fdeRestart();
- binder::Status fdeComplete(int32_t* _aidl_return);
- binder::Status fdeEnable(int32_t passwordType, const std::string& password,
- int32_t encryptionFlags);
- binder::Status fdeChangePassword(int32_t passwordType, const std::string& password);
- binder::Status fdeVerifyPassword(const std::string& password);
- binder::Status fdeGetField(const std::string& key, std::string* _aidl_return);
- binder::Status fdeSetField(const std::string& key, const std::string& value);
- binder::Status fdeGetPasswordType(int32_t* _aidl_return);
- binder::Status fdeGetPassword(std::string* _aidl_return);
- binder::Status fdeClearPassword();
-
binder::Status fbeEnable();
- binder::Status mountDefaultEncrypted();
binder::Status initUser0();
- binder::Status isConvertibleToFbe(bool* _aidl_return);
binder::Status mountFstab(const std::string& blkDevice, const std::string& mountPoint);
binder::Status encryptFstab(const std::string& blkDevice, const std::string& mountPoint,
bool shouldFormat, const std::string& fsType);
diff --git a/binder/android/os/IVold.aidl b/binder/android/os/IVold.aidl
index aee75f5..05da7b0 100644
--- a/binder/android/os/IVold.aidl
+++ b/binder/android/os/IVold.aidl
@@ -75,23 +75,9 @@
FileDescriptor mountAppFuse(int uid, int mountId);
void unmountAppFuse(int uid, int mountId);
- void fdeCheckPassword(@utf8InCpp String password);
- void fdeRestart();
- int fdeComplete();
- void fdeEnable(int passwordType, @utf8InCpp String password, int encryptionFlags);
- void fdeChangePassword(int passwordType, @utf8InCpp String password);
- void fdeVerifyPassword(@utf8InCpp String password);
- @utf8InCpp String fdeGetField(@utf8InCpp String key);
- void fdeSetField(@utf8InCpp String key, @utf8InCpp String value);
- int fdeGetPasswordType();
- @utf8InCpp String fdeGetPassword();
- void fdeClearPassword();
-
void fbeEnable();
- void mountDefaultEncrypted();
void initUser0();
- boolean isConvertibleToFbe();
void mountFstab(@utf8InCpp String blkDevice, @utf8InCpp String mountPoint);
void encryptFstab(@utf8InCpp String blkDevice, @utf8InCpp String mountPoint, boolean shouldFormat, @utf8InCpp String fsType);
@@ -148,15 +134,6 @@
void destroyDsuMetadataKey(@utf8InCpp String dsuSlot);
- const int ENCRYPTION_FLAG_NO_UI = 4;
-
- const int ENCRYPTION_STATE_NONE = 1;
- const int ENCRYPTION_STATE_OK = 0;
- const int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;
- const int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;
- const int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;
- const int ENCRYPTION_STATE_ERROR_CORRUPT = -4;
-
const int FSTRIM_FLAG_DEEP_TRIM = 1;
const int MOUNT_FLAG_PRIMARY = 1;
@@ -167,11 +144,6 @@
const int PARTITION_TYPE_PRIVATE = 1;
const int PARTITION_TYPE_MIXED = 2;
- const int PASSWORD_TYPE_PASSWORD = 0;
- const int PASSWORD_TYPE_DEFAULT = 1;
- const int PASSWORD_TYPE_PATTERN = 2;
- const int PASSWORD_TYPE_PIN = 3;
-
const int STORAGE_FLAG_DE = 1;
const int STORAGE_FLAG_CE = 2;