Class ShadowBiometricManager


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int canAuthenticate()  
      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)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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