Search in sources :

Example 6 with FingerprintSensorPropertiesInternal

use of android.hardware.fingerprint.FingerprintSensorPropertiesInternal in project android_packages_apps_Settings by omnirom.

the class SetupFingerprintEnrollIntroductionTest method setUp.

@Before
public void setUp() {
    Shadows.shadowOf(application.getPackageManager()).setSystemFeature(PackageManager.FEATURE_FINGERPRINT, true);
    final List<ComponentInfoInternal> componentInfo = new ArrayList<>();
    componentInfo.add(new ComponentInfoInternal("faceSensor", /* componentId */
    "vendor/model/revision", /* hardwareVersion */
    "1.01", /* firmwareVersion */
    "00000001", /* serialNumber */
    ""));
    componentInfo.add(new ComponentInfoInternal("matchingAlgorithm", /* componentId */
    "", /* hardwareVersion */
    "", /* firmwareVersion */
    "", /* serialNumber */
    "vendor/version/revision"));
    final FingerprintSensorPropertiesInternal prop = new FingerprintSensorPropertiesInternal(0, /* sensorId */
    SensorProperties.STRENGTH_STRONG, 5, /* maxEnrollmentsPerUser */
    componentInfo, FingerprintSensorProperties.TYPE_REAR, true);
    final ArrayList<FingerprintSensorPropertiesInternal> props = new ArrayList<>();
    props.add(prop);
    ShadowFingerprintManager.setSensorProperties(props);
    FakeFeatureFactory.setupForTest();
    final Intent intent = new Intent();
    mController = Robolectric.buildActivity(SetupFingerprintEnrollIntroduction.class, intent);
}
Also used : ComponentInfoInternal(android.hardware.biometrics.ComponentInfoInternal) FingerprintSensorPropertiesInternal(android.hardware.fingerprint.FingerprintSensorPropertiesInternal) ArrayList(java.util.ArrayList) Intent(android.content.Intent) Before(org.junit.Before)

Aggregations

FingerprintSensorPropertiesInternal (android.hardware.fingerprint.FingerprintSensorPropertiesInternal)6 FingerprintManager (android.hardware.fingerprint.FingerprintManager)4 Intent (android.content.Intent)3 ComponentInfoInternal (android.hardware.biometrics.ComponentInfoInternal)2 FooterBarMixin (com.google.android.setupcompat.template.FooterBarMixin)2 ArrayList (java.util.ArrayList)2 Before (org.junit.Before)2 PackageManager (android.content.pm.PackageManager)1 LayerDrawable (android.graphics.drawable.LayerDrawable)1 BiometricManager (android.hardware.biometrics.BiometricManager)1 BiometricError (android.hardware.biometrics.BiometricManager.BiometricError)1 FaceManager (android.hardware.face.FaceManager)1 FaceSensorPropertiesInternal (android.hardware.face.FaceSensorPropertiesInternal)1 Vibrator (android.os.Vibrator)1 View (android.view.View)1 AccessibilityManager (android.view.accessibility.AccessibilityManager)1