summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levitskiy2015-06-25 17:53:41 -0500
committerSasha Levitskiy2015-06-25 17:59:55 -0500
commit7ded5799a95cd463390141d04726d1ad13dd9cff (patch)
tree00893b672bfe28a44814b0bf2eab6a6853d244ae /fingerprintd
parent9a53bb0f809ae6d048646da2cf720d32d14f1a22 (diff)
downloadplatform-system-core-7ded5799a95cd463390141d04726d1ad13dd9cff.tar.gz
platform-system-core-7ded5799a95cd463390141d04726d1ad13dd9cff.tar.xz
platform-system-core-7ded5799a95cd463390141d04726d1ad13dd9cff.zip
Fingerprintd: Add post_enroll() API.
Change-Id: Ia50460c4fa7a5b9112f411970ab96af070863f6f Signed-off-by: Sasha Levitskiy <sanek@google.com>
Diffstat (limited to 'fingerprintd')
-rw-r--r--fingerprintd/FingerprintDaemonProxy.cpp4
-rw-r--r--fingerprintd/FingerprintDaemonProxy.h1
-rw-r--r--fingerprintd/IFingerprintDaemon.cpp10
-rw-r--r--fingerprintd/IFingerprintDaemon.h2
4 files changed, 17 insertions, 0 deletions
diff --git a/fingerprintd/FingerprintDaemonProxy.cpp b/fingerprintd/FingerprintDaemonProxy.cpp
index 4c8e47850..c310160af 100644
--- a/fingerprintd/FingerprintDaemonProxy.cpp
+++ b/fingerprintd/FingerprintDaemonProxy.cpp
@@ -134,6 +134,10 @@ uint64_t FingerprintDaemonProxy::preEnroll() {
134 return mDevice->pre_enroll(mDevice); 134 return mDevice->pre_enroll(mDevice);
135} 135}
136 136
137int32_t FingerprintDaemonProxy::postEnroll() {
138 return mDevice->post_enroll(mDevice);
139}
140
137int32_t FingerprintDaemonProxy::stopEnrollment() { 141int32_t FingerprintDaemonProxy::stopEnrollment() {
138 ALOG(LOG_VERBOSE, LOG_TAG, "stopEnrollment()\n"); 142 ALOG(LOG_VERBOSE, LOG_TAG, "stopEnrollment()\n");
139 return mDevice->cancel(mDevice); 143 return mDevice->cancel(mDevice);
diff --git a/fingerprintd/FingerprintDaemonProxy.h b/fingerprintd/FingerprintDaemonProxy.h
index 50d30efd1..871c0e62a 100644
--- a/fingerprintd/FingerprintDaemonProxy.h
+++ b/fingerprintd/FingerprintDaemonProxy.h
@@ -35,6 +35,7 @@ class FingerprintDaemonProxy : public BnFingerprintDaemon {
35 virtual void init(const sp<IFingerprintDaemonCallback>& callback); 35 virtual void init(const sp<IFingerprintDaemonCallback>& callback);
36 virtual int32_t enroll(const uint8_t* token, ssize_t tokenLength, int32_t groupId, int32_t timeout); 36 virtual int32_t enroll(const uint8_t* token, ssize_t tokenLength, int32_t groupId, int32_t timeout);
37 virtual uint64_t preEnroll(); 37 virtual uint64_t preEnroll();
38 virtual int32_t postEnroll();
38 virtual int32_t stopEnrollment(); 39 virtual int32_t stopEnrollment();
39 virtual int32_t authenticate(uint64_t sessionId, uint32_t groupId); 40 virtual int32_t authenticate(uint64_t sessionId, uint32_t groupId);
40 virtual int32_t stopAuthentication(); 41 virtual int32_t stopAuthentication();
diff --git a/fingerprintd/IFingerprintDaemon.cpp b/fingerprintd/IFingerprintDaemon.cpp
index 5f9d30c14..71317932c 100644
--- a/fingerprintd/IFingerprintDaemon.cpp
+++ b/fingerprintd/IFingerprintDaemon.cpp
@@ -103,6 +103,16 @@ status_t BnFingerprintDaemon::onTransact(uint32_t code, const Parcel& data, Parc
103 reply->writeInt64(ret); 103 reply->writeInt64(ret);
104 return NO_ERROR; 104 return NO_ERROR;
105 } 105 }
106 case POST_ENROLL: {
107 CHECK_INTERFACE(IFingerprintDaemon, data, reply);
108 if (!checkPermission(HAL_FINGERPRINT_PERMISSION)) {
109 return PERMISSION_DENIED;
110 }
111 const int32_t ret = postEnroll();
112 reply->writeNoException();
113 reply->writeInt32(ret);
114 return NO_ERROR;
115 }
106 case REMOVE: { 116 case REMOVE: {
107 CHECK_INTERFACE(IFingerprintDaemon, data, reply); 117 CHECK_INTERFACE(IFingerprintDaemon, data, reply);
108 if (!checkPermission(HAL_FINGERPRINT_PERMISSION)) { 118 if (!checkPermission(HAL_FINGERPRINT_PERMISSION)) {
diff --git a/fingerprintd/IFingerprintDaemon.h b/fingerprintd/IFingerprintDaemon.h
index 08cb00857..1eb4ac179 100644
--- a/fingerprintd/IFingerprintDaemon.h
+++ b/fingerprintd/IFingerprintDaemon.h
@@ -43,6 +43,7 @@ class IFingerprintDaemon : public IInterface, public IBinder::DeathRecipient {
43 OPEN_HAL = IBinder::FIRST_CALL_TRANSACTION + 8, 43 OPEN_HAL = IBinder::FIRST_CALL_TRANSACTION + 8,
44 CLOSE_HAL = IBinder::FIRST_CALL_TRANSACTION + 9, 44 CLOSE_HAL = IBinder::FIRST_CALL_TRANSACTION + 9,
45 INIT = IBinder::FIRST_CALL_TRANSACTION + 10, 45 INIT = IBinder::FIRST_CALL_TRANSACTION + 10,
46 POST_ENROLL = IBinder::FIRST_CALL_TRANSACTION + 11,
46 }; 47 };
47 48
48 IFingerprintDaemon() { } 49 IFingerprintDaemon() { }
@@ -54,6 +55,7 @@ class IFingerprintDaemon : public IInterface, public IBinder::DeathRecipient {
54 virtual int32_t enroll(const uint8_t* token, ssize_t tokenLength, int32_t groupId, 55 virtual int32_t enroll(const uint8_t* token, ssize_t tokenLength, int32_t groupId,
55 int32_t timeout) = 0; 56 int32_t timeout) = 0;
56 virtual uint64_t preEnroll() = 0; 57 virtual uint64_t preEnroll() = 0;
58 virtual int32_t postEnroll() = 0;
57 virtual int32_t stopEnrollment() = 0; 59 virtual int32_t stopEnrollment() = 0;
58 virtual int32_t authenticate(uint64_t sessionId, uint32_t groupId) = 0; 60 virtual int32_t authenticate(uint64_t sessionId, uint32_t groupId) = 0;
59 virtual int32_t stopAuthentication() = 0; 61 virtual int32_t stopAuthentication() = 0;