tw_crypto_pwtype: move default setting to data.cpp

Change-Id: Id3dda3bc2c32ad286b1ec67595f482f84b5077d7
This commit is contained in:
Captain Throwback
2022-01-10 21:21:16 +00:00
committed by bigbiff
parent 2e5abc3ecc
commit e331b8a1b7
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -779,6 +779,7 @@ void DataManager::SetDefaultValues()
mData.SetValue(TW_IS_ENCRYPTED, "0");
mData.SetValue(TW_IS_DECRYPTED, "0");
mData.SetValue(TW_CRYPTO_PASSWORD, "0");
mData.SetValue(TW_CRYPTO_PWTYPE, "0"); // Set initial value so that recovery will not be confused when using unencrypted data or failed to decrypt data
mData.SetValue("tw_terminal_state", "0");
mData.SetValue("tw_background_thread_running", "0");
mData.SetValue(TW_RESTORE_FILE_DATE, "0");
-1
View File
@@ -736,7 +736,6 @@ void TWPartition::Set_FBE_Status() {
bool TWPartition::Decrypt_FBE_DE() {
if (TWFunc::Path_Exists("/data/unencrypted/key/version")) {
DataManager::SetValue(TW_IS_FBE, 1);
DataManager::SetValue(TW_CRYPTO_PWTYPE, "0"); // Set initial value so that recovery will not be confused when using unencrypted data or failed to decrypt data
PartitionManager.Set_Crypto_State();
PartitionManager.Set_Crypto_Type("file");
LOGINFO("File Based Encryption is present\n");