sdk: Trust: Return TRUST_FEATURE_LEVEL_BAD on encryption inactive
* Prepare to change the logic in Trust frontend. Change-Id: I8fafdc891bdc17eb92fbfe4be33ed2cd074bad74
This commit is contained in:
@@ -307,8 +307,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
return TrustInterface.ERROR_UNDEFINED;
|
||||
}
|
||||
|
||||
boolean isOldDevice =
|
||||
mContext.getResources().getBoolean(R.bool.config_trustLegacyEncryption);
|
||||
int status = policyManager.getStorageEncryptionStatus();
|
||||
|
||||
switch (status) {
|
||||
@@ -318,9 +316,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY:
|
||||
return TrustInterface.TRUST_FEATURE_LEVEL_POOR;
|
||||
case DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE:
|
||||
return isOldDevice ?
|
||||
TrustInterface.TRUST_FEATURE_LEVEL_POOR :
|
||||
TrustInterface.TRUST_FEATURE_LEVEL_BAD;
|
||||
case DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED:
|
||||
return TrustInterface.TRUST_FEATURE_LEVEL_BAD;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user