sdm660-common: biometrics: fingerprint: Move fingerprint HIDL to 2.3
Change-Id: I2e5ed64ac7ae2f1003503072666204c0788a003a Signed-off-by: pix106 <sbordenave@gmail.com>
This commit is contained in:
parent
b0664375a1
commit
7e992f6717
6 changed files with 40 additions and 18 deletions
|
@ -5,10 +5,10 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
cc_binary {
|
cc_binary {
|
||||||
name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660",
|
name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660",
|
||||||
defaults: ["hidl_defaults"],
|
defaults: ["hidl_defaults"],
|
||||||
init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc"],
|
init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660.rc"],
|
||||||
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.xml"],
|
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660.xml"],
|
||||||
vendor: true,
|
vendor: true,
|
||||||
relative_install_path: "hw",
|
relative_install_path: "hw",
|
||||||
srcs: [
|
srcs: [
|
||||||
|
@ -23,6 +23,8 @@ cc_binary {
|
||||||
"libhardware",
|
"libhardware",
|
||||||
"libutils",
|
"libutils",
|
||||||
"android.hardware.biometrics.fingerprint@2.1",
|
"android.hardware.biometrics.fingerprint@2.1",
|
||||||
|
"android.hardware.biometrics.fingerprint@2.2",
|
||||||
|
"android.hardware.biometrics.fingerprint@2.3",
|
||||||
],
|
],
|
||||||
proprietary: true,
|
proprietary: true,
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
|
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660"
|
||||||
|
|
||||||
#include <hardware/hw_auth_token.h>
|
#include <hardware/hw_auth_token.h>
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace android {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace biometrics {
|
namespace biometrics {
|
||||||
namespace fingerprint {
|
namespace fingerprint {
|
||||||
namespace V2_1 {
|
namespace V2_3 {
|
||||||
namespace implementation {
|
namespace implementation {
|
||||||
|
|
||||||
// Supported fingerprint HAL version
|
// Supported fingerprint HAL version
|
||||||
|
@ -195,6 +195,19 @@ Return<RequestStatus> BiometricsFingerprint::authenticate(uint64_t operationId,
|
||||||
return ErrorFilter(mDevice->authenticate(mDevice, operationId, gid));
|
return ErrorFilter(mDevice->authenticate(mDevice, operationId, gid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
IBiometricsFingerprint* BiometricsFingerprint::getInstance() {
|
IBiometricsFingerprint* BiometricsFingerprint::getInstance() {
|
||||||
if (!sInstance) {
|
if (!sInstance) {
|
||||||
sInstance = new BiometricsFingerprint();
|
sInstance = new BiometricsFingerprint();
|
||||||
|
@ -379,7 +392,7 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace implementation
|
} // namespace implementation
|
||||||
} // namespace V2_1
|
} // namespace V2_3
|
||||||
} // namespace fingerprint
|
} // namespace fingerprint
|
||||||
} // namespace biometrics
|
} // namespace biometrics
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
|
|
|
@ -12,18 +12,20 @@
|
||||||
#include <hardware/fingerprint.h>
|
#include <hardware/fingerprint.h>
|
||||||
#include <hidl/MQDescriptor.h>
|
#include <hidl/MQDescriptor.h>
|
||||||
#include <hidl/Status.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 android {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace biometrics {
|
namespace biometrics {
|
||||||
namespace fingerprint {
|
namespace fingerprint {
|
||||||
namespace V2_1 {
|
namespace V2_3 {
|
||||||
namespace implementation {
|
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::IBiometricsFingerprintClientCallback;
|
||||||
using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
|
using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
|
||||||
|
using ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
|
||||||
using ::android::hardware::Return;
|
using ::android::hardware::Return;
|
||||||
using ::android::hardware::Void;
|
using ::android::hardware::Void;
|
||||||
using ::android::hardware::hidl_vec;
|
using ::android::hardware::hidl_vec;
|
||||||
|
@ -50,6 +52,12 @@ public:
|
||||||
Return<RequestStatus> setActiveGroup(uint32_t gid, const hidl_string& storePath) override;
|
Return<RequestStatus> setActiveGroup(uint32_t gid, const hidl_string& storePath) override;
|
||||||
Return<RequestStatus> authenticate(uint64_t operationId, uint32_t gid) 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:
|
private:
|
||||||
static fingerprint_device_t* openHal();
|
static fingerprint_device_t* openHal();
|
||||||
static void notify(const fingerprint_msg_t *msg); /* Static callback for legacy HAL implementation */
|
static void notify(const fingerprint_msg_t *msg); /* Static callback for legacy HAL implementation */
|
||||||
|
@ -64,7 +72,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace implementation
|
} // namespace implementation
|
||||||
} // namespace V2_1
|
} // namespace V2_3
|
||||||
} // namespace fingerprint
|
} // namespace fingerprint
|
||||||
} // namespace biometrics
|
} // namespace biometrics
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
|
|
|
@ -53,8 +53,7 @@ on post-fs-data
|
||||||
copy /data/vendor/fpc/user.db /data/vendor_de/0/fpdata/user.db
|
copy /data/vendor/fpc/user.db /data/vendor_de/0/fpdata/user.db
|
||||||
chown system system /data/vendor_de/0/fpdata/user.db
|
chown system system /data/vendor_de/0/fpdata/user.db
|
||||||
|
|
||||||
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660
|
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660
|
||||||
interface android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint default
|
|
||||||
class late_start
|
class late_start
|
||||||
user system
|
user system
|
||||||
group system uhid input
|
group system uhid input
|
|
@ -2,6 +2,6 @@
|
||||||
<hal format="hidl">
|
<hal format="hidl">
|
||||||
<name>android.hardware.biometrics.fingerprint</name>
|
<name>android.hardware.biometrics.fingerprint</name>
|
||||||
<transport>hwbinder</transport>
|
<transport>hwbinder</transport>
|
||||||
<fqname>@2.1::IBiometricsFingerprint/default</fqname>
|
<fqname>@2.3::IBiometricsFingerprint/default</fqname>
|
||||||
</hal>
|
</hal>
|
||||||
</manifest>
|
</manifest>
|
|
@ -4,17 +4,17 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
|
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sdm660"
|
||||||
|
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <hidl/HidlSupport.h>
|
#include <hidl/HidlSupport.h>
|
||||||
#include <hidl/HidlTransportSupport.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 <android/hardware/biometrics/fingerprint/2.2/types.h>
|
||||||
#include "BiometricsFingerprint.h"
|
#include "BiometricsFingerprint.h"
|
||||||
|
|
||||||
using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
|
using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
|
||||||
using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint;
|
using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint;
|
||||||
using android::hardware::configureRpcThreadpool;
|
using android::hardware::configureRpcThreadpool;
|
||||||
using android::hardware::joinRpcThreadpool;
|
using android::hardware::joinRpcThreadpool;
|
||||||
using android::sp;
|
using android::sp;
|
||||||
|
|
Loading…
Reference in a new issue