summaryrefslogtreecommitdiff
path: root/android/avrcp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-05-09 17:38:53 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-10-06 16:01:50 +0300
commit386a3a0a898af5fdd24bd54c772a5b9935a85656 (patch)
treec3db8d0b30dfe006477d6a41420dd1aff21e884e /android/avrcp.c
parent21e875ffb7d3f82bc2a5a263a0136a9b34b47269 (diff)
downloadbluez-386a3a0a898af5fdd24bd54c772a5b9935a85656.tar.gz
android/avrcp-lib: Add RegisterNotification structs
Diffstat (limited to 'android/avrcp.c')
-rw-r--r--android/avrcp.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/android/avrcp.c b/android/avrcp.c
index 5f93c3cdf..940de0b7f 100644
--- a/android/avrcp.c
+++ b/android/avrcp.c
@@ -271,8 +271,6 @@ static void handle_register_notification(const void *buf, uint16_t len)
struct hal_cmd_avrcp_register_notification *cmd = (void *) buf;
uint8_t status;
struct avrcp_request *req;
- uint8_t pdu[IPC_MTU];
- size_t pdu_len;
uint8_t code;
bool peek = false;
int ret;
@@ -298,24 +296,10 @@ static void handle_register_notification(const void *buf, uint16_t len)
goto done;
}
- pdu[0] = cmd->event;
- pdu_len = 1;
-
- switch (cmd->event) {
- case AVRCP_EVENT_STATUS_CHANGED:
- case AVRCP_EVENT_TRACK_CHANGED:
- case AVRCP_EVENT_PLAYBACK_POS_CHANGED:
- memcpy(&pdu[1], cmd->data, cmd->len);
- pdu_len += cmd->len;
- break;
- default:
- status = HAL_STATUS_FAILED;
- goto done;
- }
-
ret = avrcp_register_notification_rsp(req->dev->session,
req->transaction, code,
- pdu, pdu_len);
+ cmd->event, cmd->data,
+ cmd->len);
if (ret < 0) {
status = HAL_STATUS_FAILED;
if (!peek)