Tweaks to fingerprint AIDL
1) Explicit numbering for Error enum, which contains intentionally
skipped entries for backwards compatibility
2) Documentation for vendorCode. The vendorCodes must have a well
defined behavior with the array API for things like GSI to work,
e.g. generic system image with non-generic HAL implementation -
with this explicit requirement, both components, as long as the
contract is followed, would allow proper string feedback to be
loaded/shown.
Bug: 168843220
Test: Builds
Change-Id: Ie78e42b926351a03162a4a6e40f3325641c34609
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
index 014a4c0..4fe7f5f 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/Error.aidl
@@ -34,28 +34,28 @@
* The implementation is unable to process the request. For example, invalid arguments were
* supplied.
*/
- UNABLE_TO_PROCESS,
+ UNABLE_TO_PROCESS = 2,
/**
* The current operation took too long to complete.
*/
- TIMEOUT,
+ TIMEOUT = 3,
/**
* No space available to store additional enrollments.
*/
- NO_SPACE,
+ NO_SPACE = 4,
/**
* The operation was canceled. See common::ICancellationSignal.
*/
- CANCELED,
+ CANCELED = 5,
/**
* The implementation was unable to remove an enrollment.
* See ISession#removeEnrollments.
*/
- UNABLE_TO_REMOVE,
+ UNABLE_TO_REMOVE = 6,
/**
* Reserved to maintain backwards compatibility. See ISessionCallback#onLockoutTimed instead.
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISessionCallback.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISessionCallback.aidl
index 33a93e5..74792d8 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISessionCallback.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISessionCallback.aidl
@@ -38,7 +38,10 @@
* operation.
*
* @param info See the AcquiredInfo enum.
- * @param vendorCode Only valid if info == AcquiredInfo::VENDOR.
+ * @param vendorCode Only valid if info == AcquiredInfo::VENDOR. The vendorCode must be used to
+ * index into the configuration
+ * com.android.internal.R.array.fingerprint_acquired_vendor that's installed
+ * on the vendor partition.
*/
void onAcquired(in AcquiredInfo info, in int vendorCode);
@@ -58,7 +61,10 @@
* an Error::CANCELED message.
*
* @param error See the Error enum.
- * @param vendorCode Only valid if error == Error::VENDOR.
+ * @param vendorCode Only valid if error == Error::VENDOR. The vendorCode must be used to index
+ * into the configuration
+ * com.android.internal.R.fingerprint_error_vendor that's installed on the
+ * vendor partition.
*/
void onError(in Error error, in int vendorCode);