Move the volume changed event path from AVRCP to HEADSET
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-event-handler.c
index b8235df..f0167ea 100644 (file)
@@ -1395,6 +1395,13 @@ void __bt_headset_event_filter(GDBusConnection *connection,
                _bt_headset_event_cb(BLUETOOTH_EVENT_AUDIO_AVC_STATUS,
                                result, &mode,
                                event_info->cb, event_info->user_data);
+       } else if (strcasecmp(signal_name, BT_MEDIA_VOLUME_CHANGE) == 0) {
+               unsigned int volume;
+
+               g_variant_get(parameters, "(u)", &volume);
+               _bt_avrcp_event_cb(BLUETOOTH_EVENT_AVRCP_VOLUME_CHANGED,
+                               result, &volume,
+                               event_info->cb, event_info->user_data);
        }
 #endif
 }
@@ -1663,13 +1670,6 @@ void __bt_avrcp_event_filter(GDBusConnection *connection,
                _bt_avrcp_event_cb(BLUETOOTH_EVENT_AVRCP_DELAY_CHANGED,
                                result, &delay,
                                event_info->cb, event_info->user_data);
-       }  else if (strcasecmp(signal_name, BT_MEDIA_VOLUME_CHANGE) == 0) {
-               unsigned int volume;
-
-               g_variant_get(parameters, "(u)", &volume);
-               _bt_avrcp_event_cb(BLUETOOTH_EVENT_AVRCP_VOLUME_CHANGED,
-                               result, &volume,
-                               event_info->cb, event_info->user_data);
        }
 }