Retry fingerprint or face unlock
When IllegalStateException happens during user enters `Fingerprint Unlock` or `Face Unlock` page through `Face and Fingerprint Unlock` page, show ConfirmLock for user to re-enter credential again. If user fails to pass credential page, finish activity and back to `Security` page. If user success to pass credential page, enter `Fingerprint Unlock` or `Face Unlock` page. Test: Manully test timeout case on `Face and Fingerprint Unlock` page Test: robotest for CombinedBiometricProfileSettingsTest FaceSettingsLockscreenBypassPreferenceControllerTest Bug: 248165760 Change-Id: I3361c38d09d14461db8ecf2d89a34ba9604dc7e8
This commit is contained in:
@@ -22,6 +22,7 @@ import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.face.FaceManager;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -39,6 +40,7 @@ import java.util.Map;
|
||||
public class ShadowUtils {
|
||||
|
||||
private static FingerprintManager sFingerprintManager = null;
|
||||
private static FaceManager sFaceManager = null;
|
||||
private static boolean sIsUserAMonkey;
|
||||
private static boolean sIsDemoUser;
|
||||
private static ComponentName sDeviceOwnerComponentName;
|
||||
@@ -63,6 +65,15 @@ public class ShadowUtils {
|
||||
sFingerprintManager = fingerprintManager;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected static FaceManager getFaceManagerOrNull(Context context) {
|
||||
return sFaceManager;
|
||||
}
|
||||
|
||||
public static void setFaceManager(FaceManager faceManager) {
|
||||
sFaceManager = faceManager;
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
sFingerprintManager = null;
|
||||
sIsUserAMonkey = false;
|
||||
|
Reference in New Issue
Block a user