From 69027f84bb70cf8d52671d9104c4b533ad7e2a36 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 10 Mar 2014 13:56:25 +0200 Subject: [PATCH] android/avrcp: Fix setting wrong type for volume changed event Notification for volume changed should carry the original ctype and not translate to HAL_AVRCP_EVENT_TYPE_INTERIM or HAL_AVRCP_EVENT_TYPE_CHANGED which are only valid for register notification command. --- android/avrcp.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/android/avrcp.c b/android/avrcp.c index eab519ae1..f0a6d5983 100644 --- a/android/avrcp.c +++ b/android/avrcp.c @@ -788,17 +788,7 @@ static gboolean register_notification_rsp(struct avctp *conn, if (params == NULL || params[0] != AVRCP_EVENT_VOLUME_CHANGED) return FALSE; - switch (code) { - case AVC_CTYPE_INTERIM: - ev.type = HAL_AVRCP_EVENT_TYPE_INTERIM; - break; - case AVC_CTYPE_CHANGED: - ev.type = HAL_AVRCP_EVENT_TYPE_CHANGED; - break; - default: - return FALSE; - } - + ev.type = code; ev.volume = params[1] & 0x7F; ipc_send_notif(hal_ipc, HAL_SERVICE_ID_AVRCP, -- 2.47.3