Search in sources :

Example 1 with ComponentInfoInternal

use of android.hardware.biometrics.ComponentInfoInternal in project android_packages_apps_Settings by omnirom.

the class FingerprintSuggestionActivityTest 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(FingerprintSuggestionActivity.class, intent);
    mActivity = mController.get();
}
Also used : ComponentInfoInternal(android.hardware.biometrics.ComponentInfoInternal) FingerprintSensorPropertiesInternal(android.hardware.fingerprint.FingerprintSensorPropertiesInternal) ArrayList(java.util.ArrayList) Intent(android.content.Intent) Before(org.junit.Before)

Example 2 with ComponentInfoInternal

use of android.hardware.biometrics.ComponentInfoInternal 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

Intent (android.content.Intent)2 ComponentInfoInternal (android.hardware.biometrics.ComponentInfoInternal)2 FingerprintSensorPropertiesInternal (android.hardware.fingerprint.FingerprintSensorPropertiesInternal)2 ArrayList (java.util.ArrayList)2 Before (org.junit.Before)2