Decorate events decrypted with untrusted sessions

This commit is contained in:
Andy Uhnak
2022-09-28 17:02:45 +01:00
parent b817955e90
commit 726aa29323
18 changed files with 105 additions and 25 deletions
@@ -71,7 +71,15 @@ final class PinCodePreferences: NSObject {
}
var isBiometricsAvailable: Bool {
return LAContext().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)
var error: NSError?
let result = LAContext().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
// While in lockout they're still techincally available
if error?.code == LAError.Code.biometryLockout.rawValue {
return true
}
return result
}
/// Allowed number of PIN trials before showing forgot help alert