am 84e1d77c: am fa0ddb7b: Merge "Update FlpHardwareProvider native layer, to stop raising FatalErrors." into lmp-dev

* commit '84e1d77cc8ec8ad1c8f2c6f07eeeb1f1ff62da27':
  Update FlpHardwareProvider native layer, to stop raising FatalErrors.
This commit is contained in:
destradaa
2014-08-13 18:03:53 +00:00
committed by Android Git Automerger

View File

@@ -66,7 +66,12 @@ static inline void ThrowOnError(
}
ALOGE("Error %d in '%s'", resultCode, methodName);
env->FatalError(methodName);
// TODO: this layer needs to be refactored to return error codes to Java
// raising a FatalError is harsh, and because FLP Hardware Provider is loaded inside the system
// service, it can cause the device to reboot, or remain in a reboot loop
// a simple exception is still dumped to logcat, but it is handled more gracefully
jclass exceptionClass = env->FindClass("java/lang/RuntimeException");
env->ThrowNew(exceptionClass, methodName);
}
static bool IsValidCallbackThread() {