Package org.robolectric.shadows
Class ShadowBiometricManager
java.lang.Object
org.robolectric.shadows.ShadowBiometricManager
@Implements(className="android.hardware.biometrics.BiometricManager", minSdk=29, isInAndroidSdk=false) public class ShadowBiometricManager extends Object
Provides testing APIs for
BiometricManager
-
Field Summary
Fields Modifier and Type Field Description protected boolean
biometricServiceConnected
-
Constructor Summary
Constructors Constructor Description ShadowBiometricManager()
-
Method Summary
Modifier and Type Method Description protected int
canAuthenticate()
protected int
canAuthenticate(int userId, int authenticators)
void
setCanAuthenticate(boolean flag)
Sets the valuetrue
to allowcanAuthenticate()
returnBIOMETRIC_SUCCESS
If sets the value tofalse
, result will depend onBiometricManager#hasBiometrics(Context context)
-
Field Details
-
biometricServiceConnected
protected boolean biometricServiceConnected
-
-
Constructor Details
-
ShadowBiometricManager
public ShadowBiometricManager()
-
-
Method Details
-
canAuthenticate
-
setCanAuthenticate
public void setCanAuthenticate(boolean flag)Sets the valuetrue
to allowcanAuthenticate()
returnBIOMETRIC_SUCCESS
If sets the value tofalse
, result will depend onBiometricManager#hasBiometrics(Context context)
- Parameters:
flag
- to set can authenticate or not
-
canAuthenticate
-