diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-11-05 16:38:49 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-11-06 12:08:06 +0100 |
commit | 2e2514c502356ba567e19bec4e219d315483e9dc (patch) | |
tree | a52778bffef9665d819090640417c669fd0edcb7 /android/handsfree.c | |
parent | b0ba2f3432c938e542c4829c4e1cc58f03fc3c89 (diff) | |
download | bluez-2e2514c502356ba567e19bec4e219d315483e9dc.tar.gz |
android/handsfree: Add support for new API for cops_response
cops_response has new parameter bdaddr in new Android API.
Diffstat (limited to 'android/handsfree.c')
-rw-r--r-- | android/handsfree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/handsfree.c b/android/handsfree.c index fc6605a26..7a61dfc06 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -2031,6 +2031,7 @@ static void handle_cops(const void *buf, uint16_t len) { const struct hal_cmd_handsfree_cops_response *cmd = buf; struct hf_device *dev; + bdaddr_t bdaddr; uint8_t status; if (len != sizeof(*cmd) + cmd->len || @@ -2042,7 +2043,9 @@ static void handle_cops(const void *buf, uint16_t len) DBG(""); - dev = find_default_device(); + android2bdaddr(cmd->bdaddr, &bdaddr); + + dev = find_device(&bdaddr); if (!dev) { status = HAL_STATUS_FAILED; goto done; |