bluez: Don't create loopback source if autoswitch setting is disabled

This commit is contained in:
Julian Bouzas 2024-06-06 17:00:46 -04:00
parent be9259d952
commit 789b526c61

View file

@ -432,6 +432,11 @@ function checkProfiles (dev)
local device_id = dev["bound-id"]
local props = dev.properties
-- Don't create loopback source device if autoswitch is disabled
if not Settings.get_boolean ("bluetooth.autoswitch-to-headset-profile") then
return
end
-- Get the associated BT SpaDevice
local internal_id = tostring (props["api.bluez5.id"])
local spa_device = monitor:get_managed_object (internal_id)