otter: fingerprint: Uprev to 2.3
Change-Id: Iba942bb689a84b699a7c357d756a3c2e806be5bc
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/fingerprint/Android.bp b/fingerprint/Android.bp
index 6738385..b541224 100644
--- a/fingerprint/Android.bp
+++ b/fingerprint/Android.bp
@@ -3,10 +3,10 @@
}
cc_binary {
- name: "android.hardware.biometrics.fingerprint@2.1-service.otter",
+ name: "android.hardware.biometrics.fingerprint@2.3-service.otter",
defaults: ["hidl_defaults"],
- init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.otter.rc"],
- vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.otter.xml"],
+ init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.otter.rc"],
+ vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.otter.xml"],
vendor: true,
relative_install_path: "hw",
srcs: [
@@ -21,6 +21,8 @@
"libhardware",
"libutils",
"android.hardware.biometrics.fingerprint@2.1",
+ "android.hardware.biometrics.fingerprint@2.2",
+ "android.hardware.biometrics.fingerprint@2.3",
],
}
diff --git a/fingerprint/BiometricsFingerprint.cpp b/fingerprint/BiometricsFingerprint.cpp
index 1245cf1..bdaa9fe 100644
--- a/fingerprint/BiometricsFingerprint.cpp
+++ b/fingerprint/BiometricsFingerprint.cpp
@@ -13,8 +13,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.otter"
-#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.otter"
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.otter"
+#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.3-service.otter"
#include <hardware/hw_auth_token.h>
@@ -29,7 +29,7 @@
namespace hardware {
namespace biometrics {
namespace fingerprint {
-namespace V2_1 {
+namespace V2_3 {
namespace implementation {
// Supported fingerprint HAL version
@@ -350,8 +350,22 @@
}
}
+// Methods from ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint follow.
+
+Return<bool> BiometricsFingerprint::isUdfps(uint32_t) {
+ return false;
+}
+
+Return<void> BiometricsFingerprint::onFingerDown(uint32_t, uint32_t, float, float) {
+ 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/fingerprint/BiometricsFingerprint.h b/fingerprint/BiometricsFingerprint.h
index 6d64e3d..9945aac 100644
--- a/fingerprint/BiometricsFingerprint.h
+++ b/fingerprint/BiometricsFingerprint.h
@@ -14,8 +14,8 @@
* 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>
@@ -23,18 +23,25 @@
#include <hardware/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>
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::IBiometricsFingerprintClientCallback;
-using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+using ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
+using IBiometricsFingerprintClientCallback =
+ ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
+using RequestStatus =
+ android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+using FingerprintAcquiredInfo =
+ ::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
+using FingerprintError =
+ ::android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
+
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::hidl_vec;
@@ -61,6 +68,11 @@
Return<RequestStatus> setActiveGroup(uint32_t gid, const hidl_string& storePath) override;
Return<RequestStatus> authenticate(uint64_t operationId, uint32_t gid) override;
+ // 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;
+
private:
static fingerprint_device_t* openHal();
static void notify(const fingerprint_msg_t *msg); /* Static callback for legacy HAL implementation */
@@ -75,10 +87,10 @@
};
} // 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/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.rc b/fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.rc
similarity index 90%
rename from fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.rc
rename to fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.rc
index 7c03993..2d23954 100644
--- a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.rc
+++ b/fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.rc
@@ -1,4 +1,4 @@
-service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.otter
+service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.otter
# "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/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.xml b/fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.xml
similarity index 90%
rename from fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.xml
rename to fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.xml
index 115dd7b..4931b8a 100644
--- a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.otter.xml
+++ b/fingerprint/android.hardware.biometrics.fingerprint@2.3-service.otter.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/fingerprint/service.cpp b/fingerprint/service.cpp
index 54c2071..138439c 100644
--- a/fingerprint/service.cpp
+++ b/fingerprint/service.cpp
@@ -19,12 +19,12 @@
#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.3/IBiometricsFingerprint.h>
#include <android/hardware/biometrics/fingerprint/2.1/types.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;