Support multiple displays in fingerprint VHAL
Bug: 348076336
Test: atest android.hardware.biometrics.fingerprint.* -c
Test: atest BiometricsE2eTests:BiometricPromptAuthSuccessTest
Change-Id: Ia0e26e41b951cf00d8d098983a05f3916b12af5c
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index 143e231..6d39e12 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -74,7 +74,7 @@
auto sensorId = Fingerprint::cfg().get<std::int32_t>("sensor_id");
auto sensorStrength = Fingerprint::cfg().get<std::int32_t>("sensor_strength");
auto maxEnrollments = Fingerprint::cfg().get<std::int32_t>("max_enrollments");
- auto navigationGuesture = Fingerprint::cfg().get<bool>("navigation_guesture");
+ auto navigationGesture = Fingerprint::cfg().get<bool>("navigation_gesture");
auto detectInteraction = Fingerprint::cfg().get<bool>("detect_interaction");
auto displayTouch = Fingerprint::cfg().get<bool>("display_touch");
auto controlIllumination = Fingerprint::cfg().get<bool>("control_illumination");
@@ -82,19 +82,15 @@
common::CommonProps commonProps = {sensorId, (common::SensorStrength)sensorStrength,
maxEnrollments, componentInfo};
- SensorLocation sensorLocation = mEngine->getSensorLocation();
+ std::vector<SensorLocation> sensorLocation;
+ mEngine->getSensorLocation(sensorLocation);
+ LOG(INFO) << "sensor type:" << ::android::internal::ToString(mSensorType);
+ for (auto location : sensorLocation) {
+ LOG(INFO) << "sensor location: " << location.toString();
+ }
- LOG(INFO) << "sensor type:" << ::android::internal::ToString(mSensorType)
- << " location:" << sensorLocation.toString();
-
- *out = {{commonProps,
- mSensorType,
- {sensorLocation},
- navigationGuesture,
- detectInteraction,
- displayTouch,
- controlIllumination,
- std::nullopt}};
+ *out = {{commonProps, mSensorType, sensorLocation, navigationGesture, detectInteraction,
+ displayTouch, controlIllumination, std::nullopt}};
return ndk::ScopedAStatus::ok();
}
@@ -204,7 +200,7 @@
RESET_CONFIG_O(sensor_id);
RESET_CONFIG_O(sensor_strength);
RESET_CONFIG_O(max_enrollments);
- RESET_CONFIG_O(navigation_guesture);
+ RESET_CONFIG_O(navigation_gesture);
RESET_CONFIG_O(detect_interaction);
RESET_CONFIG_O(display_touch);
RESET_CONFIG_O(control_illumination);