From 7ba38ef0df0eb0065c3d060e5fb1133beeb271b5 Mon Sep 17 00:00:00 2001 From: Sasha Levitskiy Date: Mon, 13 Apr 2015 11:39:18 -0700 Subject: Fingerprint: Add hw token to the enroll() function. Change-Id: I3308a2567cac9290540bb7692d343ccad98b40ed Signed-off-by: Sasha Levitskiy --- .../com_android_server_fingerprint_FingerprintService.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp index e1c4e2758065..bd09bdf73f06 100644 --- a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp +++ b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include "core_jni_helpers.h" @@ -72,9 +73,10 @@ static void hal_notify_callback(fingerprint_msg_t msg) { case FINGERPRINT_ACQUIRED: arg1 = msg.data.acquired.acquired_info; break; - case FINGERPRINT_PROCESSED: - arg1 = msg.data.processed.finger.fid; - arg2 = msg.data.processed.finger.gid; + case FINGERPRINT_AUTHENTICATED: + arg1 = msg.data.authenticated.finger.fid; + arg2 = msg.data.authenticated.finger.gid; + // Jim, arg3 would be the hw_auth_token_t, please pass it the way you like. break; case FINGERPRINT_TEMPLATE_ENROLLING: arg1 = msg.data.enroll.finger.fid; @@ -101,9 +103,11 @@ static void nativeInit(JNIEnv *env, jobject clazz, jobject mQueue, jobject callb gLooper = android_os_MessageQueue_getMessageQueue(env, mQueue)->getLooper(); } -static jint nativeEnroll(JNIEnv* env, jobject clazz, jlong challenge, jint groupId, jint timeout) { +static jint nativeEnroll(JNIEnv* env, jobject clazz, jint groupId, jint timeout) { + hw_auth_token_t *hat = NULL; // This is here as a placeholder, + // please figure out your favorite way to send the hat struct through JNI ALOG(LOG_VERBOSE, LOG_TAG, "nativeEnroll(gid=%d, timeout=%d)\n", groupId, timeout); - int ret = gContext.device->enroll(gContext.device, groupId, timeout); + int ret = gContext.device->enroll(gContext.device, hat, groupId, timeout); return reinterpret_cast(ret); } -- cgit v1.2.3-59-g8ed1b