crypto: only show FBE error if device is encrypted
Change-Id: I60da4ff71a15e5bc4e13135abf268bff1c88b8d1
This commit is contained in:
committed by
bigbiff
parent
616276167d
commit
8a8e56cd60
+7
-3
@@ -698,10 +698,14 @@ void TWPartition::Setup_Data_Partition(bool Display_Error) {
|
||||
Set_FBE_Status();
|
||||
int is_device_fbe;
|
||||
DataManager::GetValue(TW_IS_FBE, is_device_fbe);
|
||||
if (!Decrypt_FBE_DE() && is_device_fbe == 1) {
|
||||
LOGERR("Unable to decrypt FBE device\n");
|
||||
char crypto_state[255];
|
||||
property_get("ro.crypto.state", crypto_state, "error");
|
||||
if (!Decrypt_FBE_DE() && strcmp(crypto_state, "error") != 0) {
|
||||
if (is_device_fbe == 1)
|
||||
LOGERR("Unable to decrypt FBE device\n");
|
||||
} else {
|
||||
DataManager::SetValue(TW_IS_ENCRYPTED, 0);
|
||||
}
|
||||
DataManager::SetValue(TW_IS_ENCRYPTED, 0);
|
||||
}
|
||||
if (datamedia && (!Is_Encrypted || (Is_Encrypted && Is_Decrypted))) {
|
||||
Setup_Data_Media();
|
||||
|
||||
Reference in New Issue
Block a user