public static class LockPatternUtils.StrongAuthTracker extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
LockPatternUtils.StrongAuthTracker.StrongAuthFlags |
Modifier and Type | Field and Description |
---|---|
protected IStrongAuthTracker.Stub |
mStub |
static int |
SOME_AUTH_REQUIRED_AFTER_USER_REQUEST
Some authentication is required because the user has temporarily disabled trust.
|
static int |
STRONG_AUTH_NOT_REQUIRED
Strong authentication is not required.
|
static int |
STRONG_AUTH_REQUIRED_AFTER_BOOT
Strong authentication is required because the user has not authenticated since boot.
|
static int |
STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW
Strong authentication is required because a device admin has requested it.
|
static int |
STRONG_AUTH_REQUIRED_AFTER_LOCKOUT
Strong authentication is required because the user has been locked out after too many
attempts.
|
Constructor and Description |
---|
StrongAuthTracker(Context context) |
StrongAuthTracker(Context context,
Looper looper) |
Modifier and Type | Method and Description |
---|---|
static int |
getDefaultFlags(Context context) |
int |
getStrongAuthForUser(int userId)
Returns
STRONG_AUTH_NOT_REQUIRED if strong authentication is not required,
otherwise returns a combination of LockPatternUtils.StrongAuthTracker.StrongAuthFlags indicating why strong
authentication is required. |
protected void |
handleStrongAuthRequiredChanged(int strongAuthFlags,
int userId) |
boolean |
isFingerprintAllowedForUser(int userId) |
boolean |
isTrustAllowedForUser(int userId) |
void |
onStrongAuthRequiredChanged(int userId)
Called when the strong authentication requirements for changed.
|
public static final int STRONG_AUTH_NOT_REQUIRED
public static final int STRONG_AUTH_REQUIRED_AFTER_BOOT
public static final int STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW
public static final int SOME_AUTH_REQUIRED_AFTER_USER_REQUEST
public static final int STRONG_AUTH_REQUIRED_AFTER_LOCKOUT
protected final IStrongAuthTracker.Stub mStub
public StrongAuthTracker(Context context)
public StrongAuthTracker(Context context, Looper looper)
looper
- the looper on whose thread calls to onStrongAuthRequiredChanged(int)
will be scheduled.context
- the current Context
public static int getDefaultFlags(Context context)
public int getStrongAuthForUser(int userId)
STRONG_AUTH_NOT_REQUIRED
if strong authentication is not required,
otherwise returns a combination of LockPatternUtils.StrongAuthTracker.StrongAuthFlags
indicating why strong
authentication is required.userId
- the user for whom the state is queried.public boolean isTrustAllowedForUser(int userId)
public boolean isFingerprintAllowedForUser(int userId)
public void onStrongAuthRequiredChanged(int userId)
protected void handleStrongAuthRequiredChanged(int strongAuthFlags, int userId)