TrustInterface: Handle unsupported encryption state

* Some devices might return unsupported, therefore
    explicitly label this state as bad

 * Also applies for special situations where encryption
    is essentially impossible, like booting with
    MultiROM from an external storage

Change-Id: I7752933bad05bf8c67f5ca0d3fba7c5b38833c87
This commit is contained in:
Adrian DC
2018-06-16 21:09:43 +02:00
parent a7d7651106
commit c24f696231

View File

@@ -301,6 +301,8 @@ public class TrustInterfaceService extends LineageSystemService {
return isOldDevice ?
TrustInterface.TRUST_FEATURE_LEVEL_POOR :
TrustInterface.TRUST_FEATURE_LEVEL_BAD;
case DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED:
return TrustInterface.TRUST_FEATURE_LEVEL_BAD;
default:
return TrustInterface.ERROR_UNDEFINED;
}