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:
Han Wang
2019-01-11 12:22:16 +01:00
committed by Michael Bestas
parent eef2974c7f
commit 7dfc51aee4

View File

@@ -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: