From 264705a3f6a3220eb293898cf190eaed55e26970 Mon Sep 17 00:00:00 2001 From: destradaa Date: Wed, 21 Aug 2013 12:55:32 -0700 Subject: [PATCH] Fixes to FlpHal JNI layer. Change-Id: I6bc7cab7b8a042be89097f786b42d8b9ae0425ea --- .../com_android_server_location_FlpHardwareProvider.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/jni/com_android_server_location_FlpHardwareProvider.cpp b/services/jni/com_android_server_location_FlpHardwareProvider.cpp index c8718281b139e..9465a68531f29 100644 --- a/services/jni/com_android_server_location_FlpHardwareProvider.cpp +++ b/services/jni/com_android_server_location_FlpHardwareProvider.cpp @@ -14,7 +14,7 @@ * limitations under the license. */ -#define LOG_TAG "FuseLocationProvider" +#define LOG_TAG "FlpHardwareProvider" #define LOG_NDEBUG 0 #define WAKE_LOCK_NAME "FLP" @@ -65,8 +65,7 @@ static inline void ThrowOnError( } ALOGE("Error %d in '%s'", resultCode, methodName); - jclass exceptionClass = env->FindClass("java/lang/RuntimeException"); - env->ThrowNew(exceptionClass, methodName); + env->FatalError(methodName); } static bool IsValidCallbackThread() { @@ -768,7 +767,7 @@ static void InjectLocation(JNIEnv* env, jobject object, jobject locationObject) FlpLocation location; TranslateFromObject(env, locationObject, location); int result = sFlpInterface->inject_location(&location); - if (result != FLP_RESULT_ERROR) { + if (result != FLP_RESULT_SUCCESS) { // do not throw but log, this operation should be fire and forget ALOGE("Error %d in '%s'", result, __FUNCTION__); }