diff options
author | Etan Cohen <etancohen@google.com> | 2016-11-10 07:44:31 -0800 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2016-11-15 01:01:37 +0000 |
commit | 69689c0657d0b6c7a2616ff9a55ecae15d1f084d (patch) | |
tree | 5dd9f1788ae431f93a38597780f1224a0a0fdc34 /service/jni | |
parent | 4f4d1b8c3c38e66ed142d29bd162827b56745c40 (diff) | |
download | android_frameworks_opt_net_wifi-69689c0657d0b6c7a2616ff9a55ecae15d1f084d.tar.gz android_frameworks_opt_net_wifi-69689c0657d0b6c7a2616ff9a55ecae15d1f084d.tar.bz2 android_frameworks_opt_net_wifi-69689c0657d0b6c7a2616ff9a55ecae15d1f084d.zip |
[AWARE] Update framework code for simplified HAL error codes
HAL error codes have been simplified (fewer) and a description
string (vendor-specific) added. Update framework code to use the
new error codes and log the description string.
(cherry-pick of commit 53007ea43c28fb700e37ba1fa74dc51953d5be71)
Bug: 27914592
Test: unit tests + integration tests passing
Change-Id: Ifb8d1c694e4ca72ecc0c4fe60c180b8a189f43d7
Diffstat (limited to 'service/jni')
-rw-r--r-- | service/jni/com_android_server_wifi_aware_WifiAwareNative.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/service/jni/com_android_server_wifi_aware_WifiAwareNative.cpp b/service/jni/com_android_server_wifi_aware_WifiAwareNative.cpp index f1d292b41..fc9a08da4 100644 --- a/service/jni/com_android_server_wifi_aware_WifiAwareNative.cpp +++ b/service/jni/com_android_server_wifi_aware_WifiAwareNative.cpp @@ -46,21 +46,22 @@ extern wifi_hal_fn hal_fn; static void OnNanNotifyResponse(transaction_id id, NanResponseMsg* msg) { ALOGD( - "OnNanNotifyResponse: transaction_id=%d, status=%d, value=%d, response_type=%d", - id, msg->status, msg->value, msg->response_type); + "OnNanNotifyResponse: transaction_id=%d, status=%d, nan_error=%s, response_type=%d", + id, msg->status, msg->nan_error, msg->response_type); JNIHelper helper(mVM); + JNIObject<jstring> nan_error = helper.newStringUTF(msg->nan_error); switch (msg->response_type) { case NAN_RESPONSE_PUBLISH: helper.reportEvent(mCls, "onAwareNotifyResponsePublishSubscribe", - "(SIIII)V", (short) id, (int) msg->response_type, - (int) msg->status, (int) msg->value, + "(SIILjava/lang/String;I)V", (short) id, (int) msg->response_type, + (int) msg->status, nan_error.get(), msg->body.publish_response.publish_id); break; case NAN_RESPONSE_SUBSCRIBE: helper.reportEvent(mCls, "onAwareNotifyResponsePublishSubscribe", - "(SIIII)V", (short) id, (int) msg->response_type, - (int) msg->status, (int) msg->value, + "(SIILjava/lang/String;I)V", (short) id, (int) msg->response_type, + (int) msg->status, nan_error.get(), msg->body.subscribe_response.subscribe_id); break; case NAN_GET_CAPABILITIES: { @@ -104,19 +105,19 @@ static void OnNanNotifyResponse(transaction_id id, NanResponseMsg* msg) { helper.reportEvent( mCls, "onAwareNotifyResponseCapabilities", - "(SIILcom/android/server/wifi/aware/WifiAwareNative$Capabilities;)V", - (short) id, (int) msg->status, (int) msg->value, data.get()); + "(SILjava/lang/String;Lcom/android/server/wifi/aware/WifiAwareNative$Capabilities;)V", + (short) id, (int) msg->status, nan_error.get(), data.get()); break; } case NAN_DP_INITIATOR_RESPONSE: - helper.reportEvent(mCls, "onAwareNotifyResponseDataPathInitiate", "(SIII)V", (short) id, - (int) msg->status, (int) msg->value, + helper.reportEvent(mCls, "onAwareNotifyResponseDataPathInitiate", "(SILjava/lang/String;I)V", + (short) id, (int) msg->status, nan_error.get(), msg->body.data_request_response.ndp_instance_id); break; default: - helper.reportEvent(mCls, "onAwareNotifyResponse", "(SIII)V", (short) id, + helper.reportEvent(mCls, "onAwareNotifyResponse", "(SIILjava/lang/String;)V", (short) id, (int) msg->response_type, (int) msg->status, - (int) msg->value); + nan_error.get()); break; } } |