Class ShadowBiometricManager


  • @Implements(className="android.hardware.biometrics.BiometricManager",
                minSdk=29,
                isInAndroidSdk=false)
    public class ShadowBiometricManager
    extends Object
    Provides testing APIs for BiometricManager
    • Field Detail

      • biometricServiceConnected

        protected boolean biometricServiceConnected
    • Constructor Detail

      • ShadowBiometricManager

        public ShadowBiometricManager()
    • Method Detail

      • canAuthenticate

        @Implementation(maxSdk=29)
        protected int canAuthenticate()
      • setCanAuthenticate

        public void setCanAuthenticate​(boolean flag)
        Sets the value true to allow canAuthenticate() return BIOMETRIC_SUCCESS If sets the value to false, result will depend on BiometricManager#hasBiometrics(Context context)
        Parameters:
        flag - to set can authenticate or not
      • canAuthenticate

        @Implementation(minSdk=30)
        protected int canAuthenticate​(int userId,
                                      int authenticators)