diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c
index 4fd86f6..6e714ef 100644
--- a/android/avrcp-lib.c
+++ b/android/avrcp-lib.c
if (handler->func == NULL)
return false;
- /* Do not trigger handler on release */
- if (!pressed)
- return true;
-
- return handler->func(session, session->passthrough_data);
+ return handler->func(session, pressed, session->passthrough_data);
}
static void disconnect_cb(void *data)
diff --git a/android/avrcp-lib.h b/android/avrcp-lib.h
index 430f545..3df5897 100644
--- a/android/avrcp-lib.h
+++ b/android/avrcp-lib.h
struct avrcp_passthrough_handler {
uint8_t op;
- bool (*func) (struct avrcp *session, void *user_data);
+ bool (*func) (struct avrcp *session, bool pressed, void *user_data);
};
typedef void (*avrcp_destroy_cb_t) (void *user_data);
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index ac267bb..0294973 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
destroy_context(context);
}
-static bool handle_play(struct avrcp *session, void *user_data)
+static bool handle_play(struct avrcp *session, bool pressed, void *user_data)
{
DBG("");
return true;
}
-static bool handle_volume_up(struct avrcp *session, void *user_data)
+static bool handle_volume_up(struct avrcp *session, bool pressed,
+ void *user_data)
{
DBG("");
return true;
}
-static bool handle_channel_up(struct avrcp *session, void *user_data)
+static bool handle_channel_up(struct avrcp *session, bool pressed,
+ void *user_data)
{
DBG("");
return true;
}
-static bool handle_select(struct avrcp *session, void *user_data)
+static bool handle_select(struct avrcp *session, bool pressed, void *user_data)
{
DBG("");