aboutsummaryrefslogtreecommitdiff
path: root/biometrics
diff options
context:
space:
mode:
Diffstat (limited to 'biometrics')
-rw-r--r--biometrics/Android.bp8
-rw-r--r--biometrics/BiometricsFingerprint.cpp24
-rw-r--r--biometrics/BiometricsFingerprint.h21
-rw-r--r--biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.rc (renamed from biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.rc)2
-rw-r--r--biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.xml (renamed from biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.xml)2
-rw-r--r--biometrics/service.cpp10
6 files changed, 46 insertions, 21 deletions
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
index f5f26c7..11fc8dd 100644
--- a/biometrics/Android.bp
+++ b/biometrics/Android.bp
@@ -1,9 +1,9 @@
cc_binary {
- name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi",
+ name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi",
defaults: ["hidl_defaults"],
relative_install_path: "hw",
- init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.rc"],
- vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.xml"],
+ init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.rc"],
+ vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.xml"],
srcs: [
"BiometricsFingerprint.cpp",
"service.cpp",
@@ -15,6 +15,8 @@ cc_binary {
"libhardware",
"libutils",
"android.hardware.biometrics.fingerprint@2.1",
+ "android.hardware.biometrics.fingerprint@2.2",
+ "android.hardware.biometrics.fingerprint@2.3",
"//hardware/xiaomi:vendor.xiaomi.hardware.fingerprintextension@1.0",
],
vendor: true,
diff --git a/biometrics/BiometricsFingerprint.cpp b/biometrics/BiometricsFingerprint.cpp
index 668c220..707099d 100644
--- a/biometrics/BiometricsFingerprint.cpp
+++ b/biometrics/BiometricsFingerprint.cpp
@@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi"
-#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi"
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi"
+#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi"
#include <hardware/hw_auth_token.h>
@@ -30,7 +30,7 @@ namespace android {
namespace hardware {
namespace biometrics {
namespace fingerprint {
-namespace V2_1 {
+namespace V2_3 {
namespace implementation {
// Supported fingerprint HAL version
@@ -375,8 +375,24 @@ Return<int32_t> BiometricsFingerprint::extCmd(int32_t cmd, int32_t param) {
return mDevice->extCmd(mDevice, cmd, param);
}
+
+Return<bool> BiometricsFingerprint::isUdfps(uint32_t /* sensorId */) {
+ return false;
+}
+
+Return<void> BiometricsFingerprint::onFingerDown(uint32_t /* x */, uint32_t /* y */,
+ float /* minor */, float /* major */) {
+ return Void();
+}
+
+Return<void> BiometricsFingerprint::onFingerUp() {
+ return Void();
+}
+
+
+
} // namespace implementation
-} // namespace V2_1
+} // namespace V2_3
} // namespace fingerprint
} // namespace biometrics
} // namespace hardware
diff --git a/biometrics/BiometricsFingerprint.h b/biometrics/BiometricsFingerprint.h
index 84e3080..124209e 100644
--- a/biometrics/BiometricsFingerprint.h
+++ b/biometrics/BiometricsFingerprint.h
@@ -15,27 +15,29 @@
* limitations under the License.
*/
-#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
-#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
+#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H
+#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H
#include <log/log.h>
#include <android/log.h>
#include "xiaomi_fingerprint.h"
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
-#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+#include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h>
#include <vendor/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.h>
namespace android {
namespace hardware {
namespace biometrics {
namespace fingerprint {
-namespace V2_1 {
+namespace V2_3 {
namespace implementation {
-using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
+using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+using ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::hidl_vec;
@@ -78,13 +80,18 @@ private:
std::mutex mClientCallbackMutex;
sp<IBiometricsFingerprintClientCallback> mClientCallback;
xiaomi_fingerprint_device_t *mDevice;
+
+ // Methods from ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint follow.
+ Return<bool> isUdfps(uint32_t sensorId) override;
+ Return<void> onFingerDown(uint32_t x, uint32_t y, float minor, float major) override;
+ Return<void> onFingerUp() override;
};
} // namespace implementation
-} // namespace V2_1
+} // namespace V2_3
} // namespace fingerprint
} // namespace biometrics
} // namespace hardware
} // namespace android
-#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
+#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H
diff --git a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.rc b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.rc
index 2fed25b..ec62a44 100644
--- a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.rc
+++ b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.rc
@@ -1,4 +1,4 @@
-service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi
+service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi
# "class hal" causes a race condition on some devices due to files created
# in /data. As a workaround, postpone startup until later in boot once
# /data is mounted.
diff --git a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.xml b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.xml
index 66a77d9..0112777 100644
--- a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi.xml
+++ b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi.xml
@@ -2,7 +2,7 @@
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
- <version>2.1</version>
+ <version>2.3</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
diff --git a/biometrics/service.cpp b/biometrics/service.cpp
index 0f6f70e..38e133e 100644
--- a/biometrics/service.cpp
+++ b/biometrics/service.cpp
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_holi"
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_holi"
#include <android/log.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
-#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
-#include <android/hardware/biometrics/fingerprint/2.1/types.h>
+#include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h>
+#include <android/hardware/biometrics/fingerprint/2.2/types.h>
#include <vendor/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.h>
#include "BiometricsFingerprint.h"
-using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
-using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint;
+using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
+using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint;
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::sp;