Skip to content

Commit

Permalink
display security level
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed May 20, 2019
1 parent e12f2cd commit 14e872a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,14 @@ private static void appendVerifiedInformation(final Context context,
bootPatchLevel.substring(0, 4) + "-" + bootPatchLevel.substring(4, 6)));
}

final String securityLevel;
if (verified.securityLevel == SECURITY_LEVEL_STRONGBOX) {
securityLevel = context.getString(R.string.security_level_strongbox);
} else {
securityLevel = context.getString(R.string.security_level_tee);
}
builder.append(context.getString(R.string.security_level, securityLevel));

final StringBuilder splitFingerprint = new StringBuilder();
for (int i = 0; i < fingerprint.length(); i += FINGERPRINT_SPLIT_INTERVAL) {
splitFingerprint.append(fingerprint.substring(i,
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<string name="os_patch_level">OS patch level: %s\n</string>
<string name="vendor_patch_level">Vendor patch level: %s\n</string>
<string name="boot_patch_level">Boot patch level: %s\n</string>
<string name="security_level">Security level: %s\n</string>
<string name="security_level_tee">Standard - Trusted Execution Environment (TEE)</string>
<string name="security_level_strongbox">High (StrongBox) - Hardware Security Module (HSM)</string>
<string name="identity">Identity: %s\n</string>
<string name="first_verified">First verified: %s\n</string>
<string name="last_verified">Last verified: %s\n</string>
Expand Down

0 comments on commit 14e872a

Please sign in to comment.