feat: Set Bluetooth adapter class to display speaker icon

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-12-30 22:59:32 +00:00
parent 706a9b4abd
commit 4bd98c17cf

View File

@@ -142,8 +142,11 @@ async def set_adapter_alias(alias):
try: try:
await adapter_props.call_set(ADAPTER_IFACE, 'Alias', Variant('s', alias)) await adapter_props.call_set(ADAPTER_IFACE, 'Alias', Variant('s', alias))
logging.info(f"Successfully set adapter alias to '{alias}'") logging.info(f"Successfully set adapter alias to '{alias}'")
# Set the adapter class to Audio/Video, Loudspeaker to get a speaker icon
await adapter_props.call_set(ADAPTER_IFACE, 'Class', Variant('u', 0x240404))
logging.info("Successfully set adapter class for speaker icon")
except Exception as e: except Exception as e:
logging.error(f"Failed to set adapter alias: {e}") logging.error(f"Failed to set adapter properties: {e}")
# --- End Bluetooth --- # --- End Bluetooth ---