Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68c33d52 authored by Alex Klyubin's avatar Alex Klyubin
Browse files

Switch to KeyguardManager.isDeviceSecure.

isKeyguardSecure also returns true when SIM PIN is required. We don't
care about that because entering SIM PIN does not unlock keys
requiring user authentication. isDeviceSecure returns true only if
secure lock screen is set up, which is exactly what we want.

Bug: 18088752
Change-Id: I47b21f3351f55c11e8e9bcfd7654762973dd9271
parent dc9b2dfa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ of the two modes:
  for use as soon as the user unlocks the secure lock screen or confirms their secure lock screen
  credentials using the {@link android.app.KeyguardManager#createConfirmDeviceCredentialIntent(CharSequence, CharSequence) KeyguardManager.createConfirmDeviceCredentialIntent}
  flow. Each key specifies for how long the authorization remains valid for that key. Such keys
  can only be generated or imported if the secure lock screen is enabled (see {@link android.app.KeyguardManager#isKeyguardSecure Keyguard.isKeyguardSecure}).
  can only be generated or imported if the secure lock screen is enabled (see {@link android.app.KeyguardManager#isDeviceSecure()}).
  These keys become permanently invalidated once the secure lock screen is disabled or forcibly
  reset (e.g. by a Device Admin).</li>
<li>User authentication is required for every use of the key. In this mode, a specific operation