From c8728cc0cb5aa137d20d8c8c2601141ac3879e60 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Thu, 12 Dec 2019 17:18:32 -0800 Subject: steering-wheel: add AFB_WARNING for unimplemented features Currently the steering wheel events from the signal-composer binding aren't handled for AVRCP. Put in AFB_WARNINGs for when events are triggered. Bug-AGL: SPEC-3047 Change-Id: I755ef4e89065560bea08b9d0a874746914fe9a14 Signed-off-by: Matt Ranostay --- binding/afm-mediaplayer-binding.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'binding/afm-mediaplayer-binding.c') diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index 495353d..b2e73d9 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -1021,7 +1021,10 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object if (!strcmp(uid, "event.media.next")) { if(data.playing) { g_mutex_lock(&mutex); - seek_track(NEXT_CMD); + if (!data.avrcp_connected) + seek_track(NEXT_CMD); + else + AFB_WARNING("currently '%s' not supported for AVRCP controls", uid); g_mutex_unlock(&mutex); json_object_get(object); @@ -1030,7 +1033,10 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object } else if (!strcmp(uid, "event.media.previous")) { if(data.playing) { g_mutex_lock(&mutex); - seek_track(PREVIOUS_CMD); + if (!data.avrcp_connected) + seek_track(PREVIOUS_CMD); + else + AFB_WARNING("currently %s not supported for AVRCP controls", uid); g_mutex_unlock(&mutex); json_object_get(object); -- cgit 1.2.3-korg