summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andres Morales <anmorales@google.com> 2015-04-15 20:49:35 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-04-15 20:49:38 +0000
commitafbcabd8d893d086872dcd8c40980ddb5eb5014e (patch)
tree4ee4fbf873f398a606bc10812e474aeb73f34e2c
parent019f13c48cc1f32ad4d1c6c9644fa0eecc6f497e (diff)
parentfe66955503c74515c7e2f07aa152276010d7f5a6 (diff)
Merge "Check correct NO_ERROR response from Keystore"
-rw-r--r--services/core/jni/com_android_server_fingerprint_FingerprintService.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
index 26e539a7b537..5a869238263f 100644
--- a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
+++ b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp
@@ -26,6 +26,7 @@
#include <utils/String16.h>
#include <utils/Looper.h>
#include <keystore/IKeystoreService.h>
+#include <keystore/keystore.h> // for error code
#include <hardware/hardware.h>
#include <hardware/fingerprint.h>
@@ -74,8 +75,9 @@ static void notifyKeystore(uint8_t *auth_token, size_t auth_token_length) {
sp<IBinder> binder = sm->getService(String16("android.security.keystore"));
sp<IKeystoreService> service = interface_cast<IKeystoreService>(binder);
if (service != NULL) {
- if (service->addAuthToken(auth_token, auth_token_length) != NO_ERROR) {
- ALOGE("Falure sending auth token to KeyStore");
+ status_t ret = service->addAuthToken(auth_token, auth_token_length);
+ if (ret != ResponseCode::NO_ERROR) {
+ ALOGE("Falure sending auth token to KeyStore: %d", ret);
}
} else {
ALOGE("Unable to communicate with KeyStore");