Launch settings for clicking fingerprint unlock
Launch FingerprintSettings directly when user clicks "Fingerprint Unlock". Let Fingerprint settings peform confirmLock() or chooseLock(). And to have smoothly animation, instead of generating challenge in FingerprintSettings::onActivityResult(), challenge is generated in next visible activity, and pass it back through next activity result. Bug: 197717071 Test: atest GatekeeperPasswordProviderTest CredentialModelTest Test: atest AutoCredentialViewModelTest FingerprintStatusUtilsTest Test: RunSettingsRoboTests2 FingerprintEnrollIntroductionTest Test: Manually test fingerprint enroll in settings or suw Change-Id: Ie27c3c493ea475f6b53cb6bb3f2d45d555f47cb3
This commit is contained in:
@@ -50,6 +50,7 @@ public final class CredentialModel {
|
||||
/**
|
||||
* Default value if GkPwHandle is invalid.
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public static final long INVALID_GK_PW_HANDLE = 0L;
|
||||
|
||||
/**
|
||||
@@ -115,8 +116,8 @@ public final class CredentialModel {
|
||||
/**
|
||||
* Check user id is valid or not
|
||||
*/
|
||||
public static boolean isValidUserId(int userId) {
|
||||
return userId != UserHandle.USER_NULL;
|
||||
public boolean isValidUserId() {
|
||||
return mUserId != UserHandle.USER_NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,6 +135,13 @@ public final class CredentialModel {
|
||||
mChallenge = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check challenge is valid or not
|
||||
*/
|
||||
public boolean isValidChallenge() {
|
||||
return mChallenge != INVALID_CHALLENGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get challenge token
|
||||
*/
|
||||
@@ -153,8 +161,8 @@ public final class CredentialModel {
|
||||
/**
|
||||
* Check challengeToken is valid or not
|
||||
*/
|
||||
public static boolean isValidToken(@Nullable byte[] token) {
|
||||
return token != null;
|
||||
public boolean isValidToken() {
|
||||
return mToken != null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,8 +183,8 @@ public final class CredentialModel {
|
||||
/**
|
||||
* Check gkPwHandle is valid or not
|
||||
*/
|
||||
public static boolean isValidGkPwHandle(long gkPwHandle) {
|
||||
return gkPwHandle != INVALID_GK_PW_HANDLE;
|
||||
public boolean isValidGkPwHandle() {
|
||||
return mGkPwHandle != INVALID_GK_PW_HANDLE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,10 +214,10 @@ public final class CredentialModel {
|
||||
+ ", userId:" + mUserId
|
||||
+ ", challenge:{len:" + challengeLen
|
||||
+ ", updateMillis:" + mUpdateChallengeMillis + "}"
|
||||
+ ", token:{len:" + tokenLen + ", isValid:" + isValidToken(mToken)
|
||||
+ ", token:{len:" + tokenLen + ", isValid:" + isValidToken()
|
||||
+ ", updateMillis:" + mUpdateTokenMillis + "}"
|
||||
+ ", gkPwHandle:{len:" + gkPwHandleLen + ", isValid:"
|
||||
+ isValidGkPwHandle(mGkPwHandle) + ", clearMillis:" + mClearGkPwHandleMillis + "}"
|
||||
+ ", gkPwHandle:{len:" + gkPwHandleLen + ", isValid:" + isValidGkPwHandle()
|
||||
+ ", clearMillis:" + mClearGkPwHandleMillis + "}"
|
||||
+ ", mSensorId:{id:" + mSensorId + ", updateMillis:" + mUpdateSensorIdMillis + "}"
|
||||
+ " }";
|
||||
}
|
||||
|
Reference in New Issue
Block a user