mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
audio: un-dumbify audio service
This commit is contained in:
@@ -18,7 +18,7 @@ Singleton {
|
||||
return [];
|
||||
|
||||
return adapter.devices.values.filter((dev) => {
|
||||
return dev && dev.paired && isValidDevice(dev);
|
||||
return dev && dev.paired;
|
||||
});
|
||||
}
|
||||
readonly property var allDevicesWithBattery: {
|
||||
@@ -47,20 +47,6 @@ Singleton {
|
||||
});
|
||||
}
|
||||
|
||||
function isValidDevice(device) {
|
||||
if (!device)
|
||||
return false;
|
||||
|
||||
var displayName = device.name || device.deviceName;
|
||||
if (!displayName || displayName.length < 2)
|
||||
return false;
|
||||
|
||||
if (displayName.startsWith('/org/bluez') || displayName.includes('hci0'))
|
||||
return false;
|
||||
|
||||
return displayName.length >= 3;
|
||||
}
|
||||
|
||||
function getDeviceIcon(device) {
|
||||
if (!device)
|
||||
return "bluetooth";
|
||||
|
||||
Reference in New Issue
Block a user