From 5ffacf20ed906dc512912c43ec13fbef05d19cbb Mon Sep 17 00:00:00 2001 From: bengris32 Date: Sun, 27 Nov 2022 12:06:38 +0000 Subject: [PATCH] interfaces: goodix: Initial reserve engineered 1.0 fingerprintextension Change-Id: Ie5dba919dd7dcd78030ac936649a97ac1b7854e3 --- .../fingerprintextension/1.0/Android.bp | 15 +++ .../1.0/IGoodixBiometricsFingerprint.hal | 42 +++++++++ ...dixBiometricsFingerprintClientCallback.hal | 91 +++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 interfaces/goodix/hardware/fingerprintextension/1.0/Android.bp create mode 100644 interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprint.hal create mode 100644 interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprintClientCallback.hal diff --git a/interfaces/goodix/hardware/fingerprintextension/1.0/Android.bp b/interfaces/goodix/hardware/fingerprintextension/1.0/Android.bp new file mode 100644 index 0000000..861eb85 --- /dev/null +++ b/interfaces/goodix/hardware/fingerprintextension/1.0/Android.bp @@ -0,0 +1,15 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +hidl_interface { + name: "vendor.goodix.hardware.fingerprintextension@1.0", + root: "vendor.goodix", + system_ext_specific: true, + srcs: [ + "IGoodixBiometricsFingerprint.hal", + "IGoodixBiometricsFingerprintClientCallback.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + gen_java: true, +} diff --git a/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprint.hal b/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprint.hal new file mode 100644 index 0000000..17aa187 --- /dev/null +++ b/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprint.hal @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2022 bengris32 + * 2024 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package vendor.goodix.hardware.fingerprintextension@1.0; + +import IGoodixBiometricsFingerprintClientCallback; + +interface IGoodixBiometricsFingerprint { + authenticateFido(uint32_t groupId, vec aaid, vec finalChallenge) generates (uint32_t ret); + cameraCapture() generates (uint32_t ret); + dumpCmd(uint32_t cmdId, vec param) generates (uint32_t ret); + enableFfFeature(uint8_t enableFlag) generates (uint32_t ret); + enableFingerprintModule(uint8_t enableFlag) generates (uint32_t ret); + getIdList(uint32_t groupId) generates (uint32_t i, vec arrayList); + invoke_fido_command(vec in_buf) generates (uint32_t i, vec arrayList); + isIdValid(uint32_t groupId, uint32_t fingerId) generates (uint32_t ret); + navigate(uint32_t navMode) generates (uint32_t ret); + screenOff() generates (uint32_t ret); + screenOn() generates (uint32_t ret); + setSafeClass(uint32_t safeClass) generates (uint32_t ret); + startHbd() generates (uint32_t ret); + stopAuthenticateFido() generates (uint32_t ret); + stopCameraCapture() generates (uint32_t ret); + stopHbd() generates (uint32_t ret); + stopNavigation() generates (uint32_t ret); + testCmd(uint32_t cmdId, vec param) generates (uint32_t ret); + testInit(IGoodixBiometricsFingerprintClientCallback callback) generates (uint32_t ret); +}; diff --git a/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprintClientCallback.hal b/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprintClientCallback.hal new file mode 100644 index 0000000..5b77fd5 --- /dev/null +++ b/interfaces/goodix/hardware/fingerprintextension/1.0/IGoodixBiometricsFingerprintClientCallback.hal @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package vendor.goodix.hardware.fingerprintextension@1.0; + +interface IGoodixBiometricsFingerprintClientCallback { + /** + * Sent when one enrollment step is complete. + * @param deviceId the instance of this fingerprint device + * @param fingerId the fingerprint templetate being enrolled + * @param groupId the groupid for the template being enrolled + * @param remaining the number of remaining steps before enrolllment is complete + */ + oneway onEnrollResult(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); + + /** + * Sent when a fingerprint image is acquired by the sensor + * @param deviceId the instance of this fingerprint device + * @param acquiredInfo a message about the quality of the acquired image + */ + oneway onAcquired(uint64_t deviceId, uint32_t acquiredInfo); + + /** + * Sent when a fingerprint is authenticated + * @param deviceId the instance of this fingerprint device + * @param fingerId the fingerprint templetate that was authenticated + * @param groupId the groupid for the template that was authenticated + * @param token the hardware authentication token to pass to Keystore.addAuthToken() + */ + oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec token); + + /** + * Sent when a fingerprint is authenticated for fido + * @param devId the instance of this fingerprint device + * @param fpId the fingerprint templetate that was authenticated + * @param uvtData the uvtData + */ + oneway onAuthenticatedFido(uint64_t devId, uint32_t fpId, vec uvtData); + + /** + * Sent on a dump + * @param devId the instance of this fingerprint device + * @param cmdId the id of the command sent + * @param data the dumped data + */ + oneway onDump(int64_t devId, int32_t cmdId, vec data); + + /** + * Sent when a fingerprint error occurs + * @param deviceId the instance of this fingerprint device + * @param error a message about the error that occurred + */ + oneway onError(uint64_t deviceId, uint32_t error); + + /** + * Sent when one template is removed + * @param deviceId the instance of this fingerprint device + * @param fingerId the fingerprint templetate being removed + * @param groupId the groupid for the template being removed + */ + oneway onRemoved(uint64_t deviceId, uint32_t fingerId, uint32_t groupId); + + /** + * Sent when a test command is completed + * @param deviceId the instance of this fingerprint device + * @param cmdId the id of the command sent + * @param result the result of the command + */ + oneway onTestCmd(uint64_t deviceId, uint32_t cmdId, vec result); + + /** + * Sent for hbd data + * @param devId the instance of this fingerprint device + * @param heartBeatRate the heart beat rate + * @param data the hbd data + */ + oneway onHbdData(uint64_t devId, uint32_t heartBeatRate, uint32_t status, vec data); +};