Diff between 70a7c773c80ab7dfbd6d13377366b7b074ceecd5 and c7d4ffd327d9530d9f216b09f9fd9d25e8ee81e5

Changed Files

File Additions Deletions Status
android/hal-hidhost.c +12 -0 modified

Full Patch

diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index 3c147e8..34f9f77 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -77,6 +77,15 @@ static void handle_get_report(void *buf)
 							ev->data, ev->len);
 }
 
+static void handle_virtual_unplug(void *buf)
+{
+	struct hal_ev_hidhost_virtual_unplug *ev = buf;
+
+	if (cbacks->virtual_unplug_cb)
+		cbacks->virtual_unplug_cb((bt_bdaddr_t *) ev->bdaddr,
+								ev->status);
+}
+
 /* will be called from notification thread context */
 void bt_notify_hidhost(uint16_t opcode, void *buf, uint16_t len)
 {
@@ -96,6 +105,9 @@ void bt_notify_hidhost(uint16_t opcode, void *buf, uint16_t len)
 	case HAL_EV_HIDHOST_GET_REPORT:
 		handle_get_report(buf);
 		break;
+	case HAL_EV_HIDHOST_VIRTUAL_UNPLUG:
+		handle_virtual_unplug(buf);
+		break;
 	default:
 		DBG("Unhandled callback opcode=0x%x", opcode);
 		break;