Add sensorLocation, sensorRadius, displayId to SensorProps
Bug: 168541000
Test: make -j56 android.hardware.biometrics.fingerprint-update-api
Change-Id: Ia8323a114c74ec9c6680333c868881ac51e6363f
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/SensorProps.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/SensorProps.aidl
index 04a8f86..9d946a9 100644
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/SensorProps.aidl
+++ b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/SensorProps.aidl
@@ -20,4 +20,8 @@
parcelable SensorProps {
android.hardware.biometrics.common.CommonProps commonProps;
android.hardware.biometrics.fingerprint.FingerprintSensorType sensorType;
+ int sensorLocationX;
+ int sensorLocationY;
+ int sensorRadius;
+ int displayId;
}
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/SensorProps.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/SensorProps.aidl
index 5355c5e..7c1e176 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/SensorProps.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/SensorProps.aidl
@@ -31,5 +31,35 @@
* sensor.
*/
FingerprintSensorType sensorType;
+
+ /**
+ * The location of the center of the sensor if applicable. For example,
+ * sensors of FingerprintSensorType::UNDER_DISPLAY_* would report this
+ * value as the distance in pixels, measured from the left edge of the
+ * screen.
+ */
+ int sensorLocationX;
+
+ /**
+ * The location of the center of the sensor if applicable. For example,
+ * sensors of FingerprintSensorType::UNDER_DISPLAY_* would report this
+ * value as the distance in pixels, measured from the top edge of the
+ * screen.
+ */
+ int sensorLocationY;
+
+ /**
+ * The radius of the sensor if applicable. For example, sensors of
+ * FingerprintSensorType::UNDER_DISPLAY_* would report this value as
+ * the radius of the sensor, in pixels.
+ */
+ int sensorRadius;
+
+ /**
+ * For sensors of FingerprintSensorType::UNDER_DISPLAY_*, this must
+ * correspond to the android.hardware.DisplayManager#getDisplay Android
+ * API.
+ */
+ int displayId;
}
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index b5d3949..80266d2 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -30,7 +30,11 @@
kSensorStrength,
kMaxEnrollmentsPerUser};
SensorProps props = {commonProps,
- kSensorType};
+ kSensorType,
+ 0 /* sensorLocationX */,
+ 0 /* sensorLocationY */,
+ 0 /* sensorRadius */,
+ 0 /* displayId */};
return_val->push_back(props);
return ndk::ScopedAStatus::ok();
}