Diff between ebfb3817ce88b5c5948036314e0689f57f591330 and baea35a68a1df00f100ff30ff261a0a6fbf3c66b

Changed Files

File Additions Deletions Status
android/android-tester.c +17 -2 modified

Full Patch

diff --git a/android/android-tester.c b/android/android-tester.c
index 8785b84..a82a58e 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -3267,15 +3267,30 @@ static void hidhost_virual_unplug_cb(bt_bdaddr_t *bd_addr, bthh_status_t status)
 		test->expected_hal_cb.virtual_unplug_cb(bd_addr, status);
 }
 
-static void hidhost_hid_info_cb(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid)
+static gboolean hidhost_hid_info(gpointer user_data)
 {
 	struct test_data *data = tester_get_data();
 	const struct hidhost_generic_data *test = data->test_data;
+	struct hh_cb_data *cb_data = user_data;
 
 	data->cb_count++;
 
 	if (test && test->expected_hal_cb.hid_info_cb)
-		test->expected_hal_cb.hid_info_cb(bd_addr, hid);
+		test->expected_hal_cb.hid_info_cb(&cb_data->bdaddr,
+							cb_data->hid_info);
+
+	g_free(cb_data);
+	return FALSE;
+}
+
+static void hidhost_hid_info_cb(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid)
+{
+	struct hh_cb_data *cb_data = g_new0(struct hh_cb_data, 1);
+
+	cb_data->bdaddr = *bd_addr;
+	cb_data->hid_info = hid;
+
+	g_idle_add(hidhost_hid_info, cb_data);
 }
 
 static void hidhost_protocol_mode_cb(bt_bdaddr_t *bd_addr,