diff options
author | Andres Morales <anmorales@google.com> | 2015-04-16 14:12:38 -0700 |
---|---|---|
committer | Andres Morales <anmorales@google.com> | 2015-04-22 16:55:10 +0000 |
commit | 4d41a203a08c55b3f3190519535ccee6557ea4fe (patch) | |
tree | b8ffd58bf8e189dcc4980378d353c7e2baa3b293 /services | |
parent | b5665c99105170998f0069b2a53d50587074f437 (diff) | |
download | frameworks_base-4d41a203a08c55b3f3190519535ccee6557ea4fe.zip frameworks_base-4d41a203a08c55b3f3190519535ccee6557ea4fe.tar.gz frameworks_base-4d41a203a08c55b3f3190519535ccee6557ea4fe.tar.bz2 |
Expose getAuthenticatorId API
Change-Id: I112c45d596c66e3f6ebd94fecffcb6bb7c3a335a
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/fingerprint/FingerprintService.java | 7 | ||||
-rw-r--r-- | services/core/jni/com_android_server_fingerprint_FingerprintService.cpp | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java index ac488e3..28597c1 100644 --- a/services/core/java/com/android/server/fingerprint/FingerprintService.java +++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java @@ -111,6 +111,7 @@ public class FingerprintService extends SystemService { static native int nativeOpenHal(); static native int nativeCloseHal(); static native void nativeInit(MessageQueue queue, FingerprintService service); + static native long nativeGetAuthenticatorId(); static final class FpHalMsg { int type; // Type of the message. One of the constants in fingerprint.h @@ -595,6 +596,12 @@ public class FingerprintService extends SystemService { checkPermission(USE_FINGERPRINT); return FingerprintService.this.hasEnrolledFingerprints(groupId); } + + @Override + public long getAuthenticatorId() { + checkPermission(USE_FINGERPRINT); + return nativeGetAuthenticatorId(); + } } @Override diff --git a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp index 5a86923..7dbfaf6 100644 --- a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp +++ b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp @@ -177,6 +177,10 @@ static jint nativeRemove(JNIEnv* env, jobject clazz, jint fingerId, jint groupId return reinterpret_cast<jint>(ret); } +static jlong nativeGetAuthenticatorId(JNIEnv *, jobject clazz) { + return gContext.device->get_authenticator_id(gContext.device); +} + static jint nativeOpenHal(JNIEnv* env, jobject clazz) { ALOG(LOG_VERBOSE, LOG_TAG, "nativeOpenHal()\n"); int err; @@ -229,6 +233,7 @@ static jint nativeCloseHal(JNIEnv* env, jobject clazz) { return -ENOSYS; // TODO } + // ---------------------------------------------------------------------------- @@ -240,6 +245,7 @@ static const JNINativeMethod g_methods[] = { { "nativePreEnroll", "()J", (void*)nativePreEnroll }, { "nativeStopEnrollment", "()I", (void*)nativeStopEnrollment }, { "nativeRemove", "(II)I", (void*)nativeRemove }, + { "nativeGetAuthenticatorId", "()J", (void*)nativeGetAuthenticatorId }, { "nativeOpenHal", "()I", (void*)nativeOpenHal }, { "nativeCloseHal", "()I", (void*)nativeCloseHal }, { "nativeInit","(Landroid/os/MessageQueue;" |