diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-12-12 17:18:32 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-12-12 17:27:47 -0800 |
commit | c8728cc0cb5aa137d20d8c8c2601141ac3879e60 (patch) | |
tree | 87f8159336eac5a3b2754c1cd7c88c09648816de /binding | |
parent | 76169c061b7ceabdf6f67dcc700d53ae8f02c821 (diff) |
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 <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r-- | binding/afm-mediaplayer-binding.c | 10 |
1 files changed, 8 insertions, 2 deletions
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); |