From 848c8c4c43c42da11cf62a964989c1912500e302 Mon Sep 17 00:00:00 2001 From: Ashutosh Joshi Date: Wed, 6 Jul 2016 13:54:28 -0700 Subject: [PATCH] Make ContextHubService compliant with new context hub interface. Context Hub HAL added messages with definition for all distinguished messages. Fixing the ContextHubService to be compliant. Bug: 29835220 Change-Id: I70751d0f5b06cd3c8a4ce93003bdaa86b7317a2c --- core/jni/android_hardware_location_ContextHubService.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/jni/android_hardware_location_ContextHubService.cpp b/core/jni/android_hardware_location_ContextHubService.cpp index 3881d6d9e99f4..a56eba6c133fe 100644 --- a/core/jni/android_hardware_location_ContextHubService.cpp +++ b/core/jni/android_hardware_location_ContextHubService.cpp @@ -186,9 +186,13 @@ static int set_dest_app(hub_message_t *msg, int id) { static void send_query_for_apps() { hub_message_t msg; + query_apps_request_t queryMsg; + + queryMsg.app_name.id = NANOAPP_VENDOR_ALL_APPS; msg.message_type = CONTEXT_HUB_QUERY_APPS; - msg.message_len = 0; + msg.message_len = sizeof(queryMsg); + msg.message = &queryMsg; for (int i = 0; i < db.hubInfo.numHubs; i++ ) { ALOGD("Sending query for apps to hub %d", i);