diff options
author | Deokhyun Kim <dukan.kim@samsung.com> | 2019-07-18 17:33:02 +0900 |
---|---|---|
committer | Deokhyun Kim <dukan.kim@samsung.com> | 2019-07-18 17:33:02 +0900 |
commit | 2f8006936d3d15a41b555a5abe0bb243051628bc (patch) | |
tree | a58479c28c6b3d2ec09a93f86a03e1f2e2a73b97 | |
parent | 540f5c40500a6e4ef264a7fc37cfe6e307e4356e (diff) | |
download | bluez-2f8006936d3d15a41b555a5abe0bb243051628bc.tar.gz bluez-2f8006936d3d15a41b555a5abe0bb243051628bc.tar.bz2 bluez-2f8006936d3d15a41b555a5abe0bb243051628bc.zip |
Restrict AVRCP in case A2DP is restricted
Change-Id: I39b1d0a7aebd156c23264d175a7500e1879c545c
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
-rw-r--r-- | profiles/audio/a2dp.c | 6 | ||||
-rw-r--r-- | profiles/audio/avctp.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index 0619bb1c..2b8bfce1 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -1654,11 +1654,7 @@ static void confirm_cb(GIOChannel *io, gpointer data) goto drop; #ifdef TIZEN_FEATURE_BLUEZ_MODIFY -{ - gboolean restricted = FALSE; - - restricted = device_is_profile_blocked(device, A2DP_SINK_UUID); - if (restricted) { + if (device_is_profile_blocked(device, A2DP_SINK_UUID)) { DBG("A2DP is restricted"); goto drop; } diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 898b5965..47893c1f 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -1640,6 +1640,11 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data) return; #ifdef TIZEN_FEATURE_BLUEZ_MODIFY + if (device_is_profile_blocked(device, A2DP_SINK_UUID)) { + DBG("A2DP is restricted"); + return; + } + char name[10]; device_get_name(device, name, sizeof(name)); DBG("name : %s", name); |