diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2013-10-31 16:45:04 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-31 16:57:58 +0200 |
commit | 89dc0b402dd2e519b9905eb68be1add5d040b5dc (patch) | |
tree | 2c4a7383dc13ad13d9a99ed616e175dd71afff57 /android/hal-hidhost.c | |
parent | 928162d18545c5f0e6387c08adbd60961e0a485a (diff) | |
download | bluez-89dc0b402dd2e519b9905eb68be1add5d040b5dc.tar.gz |
android/hidhost: Fix not unregistering HID
If HID is not unregistered it cannot be registered again and we get
following error:
...
E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
...
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r-- | android/hal-hidhost.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c index a72410bf1..e148dc2b2 100644 --- a/android/hal-hidhost.c +++ b/android/hal-hidhost.c @@ -301,12 +301,19 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks) static void hh_cleanup(void) { + struct hal_cmd_unregister_module cmd; + DBG(""); if (!interface_ready()) return; bt_hh_cbacks = NULL; + + cmd.service_id = HAL_SERVICE_ID_HIDHOST; + + hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE, + sizeof(cmd), &cmd, 0, NULL, NULL); } static bthh_interface_t hh_if = { |