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
This commit is contained in:
Alex Klyubin
2015-05-08 08:44:59 -07:00
parent dc9b2dfae2
commit 68c33d52bf

View File

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