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.
diff --git a/android/avrcp.c b/android/avrcp.c
index eab519a..f0a6d59 100644
--- a/android/avrcp.c
+++ b/android/avrcp.c
@@ -788,17 +788,7 @@
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,