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-13 01:28:57 +0000 |
commit | 64d3918ab5fe49be0d44a2aef4f338e89091fc57 (patch) | |
tree | b227672fab1d7700065fa2a2063c329c1a12cc0f /binding | |
parent | 4329f35e9112f392f3a4e3c825bedf6bca136690 (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); |