Loading system/gd/rust/linux/client/src/command_handler.rs +0 −4 Original line number Diff line number Diff line Loading @@ -889,7 +889,6 @@ impl CommandHandler { uuids, wake_allowed, dual_mode_audio, le_audio_stable, ) = { let ctx = self.lock_context(); let adapter = ctx.adapter_dbus.as_ref().unwrap(); Loading @@ -909,7 +908,6 @@ impl CommandHandler { let uuids = adapter.get_remote_uuids(device.clone()); let wake_allowed = adapter.get_remote_wake_allowed(device.clone()); let dual_mode_audio = adapter.is_dual_mode_audio_sink_device(device.clone()); let le_audio_stable = adapter.is_le_audio_stable(device.clone()); ( name, Loading @@ -923,7 +921,6 @@ impl CommandHandler { uuids, wake_allowed, dual_mode_audio, le_audio_stable, ) }; Loading @@ -938,7 +935,6 @@ impl CommandHandler { print_info!("Bond State: {:?}", bonded); print_info!("Connection State: {}", connection_state); print_info!("Dual Mode Audio Device: {}", dual_mode_audio); print_info!("Is LE Audio Stable: {}", le_audio_stable); print_info!( "Uuids: {}", DisplayList( Loading system/gd/rust/linux/client/src/dbus_iface.rs +0 −5 Original line number Diff line number Diff line Loading @@ -1037,11 +1037,6 @@ impl IBluetooth for BluetoothDBus { dbus_generated!() } #[dbus_method("IsLEAudioStable")] fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { dbus_generated!() } #[dbus_method("GetDumpsys")] fn get_dumpsys(&self) -> String { dbus_generated!() Loading system/gd/rust/linux/service/src/iface_bluetooth.rs +0 −5 Original line number Diff line number Diff line Loading @@ -768,11 +768,6 @@ impl IBluetooth for IBluetoothDBus { dbus_generated!() } #[dbus_method("IsLEAudioStable", DBusLog::Disable)] fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { dbus_generated!() } #[dbus_method("GetDumpsys", DBusLog::Disable)] fn get_dumpsys(&self) -> String { dbus_generated!() Loading system/gd/rust/linux/stack/src/bluetooth.rs +1 −18 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ use bt_topshim::{ }, profiles::sdp::{BtSdpRecord, Sdp, SdpCallbacks, SdpCallbacksDispatcher}, profiles::ProfileConnectionState, sysprop, topstack, topstack, }; use bt_utils::array_utils; Loading Loading @@ -266,9 +266,6 @@ pub trait IBluetooth { /// LE Audio sink roles). fn is_dual_mode_audio_sink_device(&self, device: BluetoothDevice) -> bool; /// Returns whether the remote device is LE audio stable. fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool; /// Gets diagnostic output. fn get_dumpsys(&self) -> String; } Loading Loading @@ -3007,20 +3004,6 @@ impl IBluetooth for Bluetooth { }) } fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { let model_name = match self.get_remote_device_property(&device, &BtPropertyType::RemoteModelName) { Some(BluetoothProperty::RemoteModelName(name)) => name, _ => { return false; } }; sysprop::get_string(sysprop::PropertyString::LeAudioAllowList) .split(",") .any(|model| model == model_name) } fn get_dumpsys(&self) -> String { OpenOptions::new() .write(true) Loading system/gd/rust/topshim/src/btif.rs +1 −10 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ pub enum BtPropertyType { // Unimplemented: // BT_PROPERTY_REMOTE_ASHA_CAPABILITY, // BT_PROPERTY_REMOTE_ASHA_TRUNCATED_HISYNCID, RemoteModelName = 0x17, // BT_PROPERTY_REMOTE_MODEL_NUM, RemoteAddrType = 0x18, Unknown = 0xFE, Loading Loading @@ -586,7 +586,6 @@ pub enum BluetoothProperty { RemoteIsCoordinatedSetMember(bool), Appearance(u16), VendorProductInfo(BtVendorProductInfo), RemoteModelName(String), RemoteAddrType(BtAddrType), RemoteDeviceTimestamp(), Loading Loading @@ -631,7 +630,6 @@ impl BluetoothProperty { BluetoothProperty::Appearance(_) => BtPropertyType::Appearance, BluetoothProperty::VendorProductInfo(_) => BtPropertyType::VendorProductInfo, BluetoothProperty::RemoteDeviceTimestamp() => BtPropertyType::RemoteDeviceTimestamp, BluetoothProperty::RemoteModelName(_) => BtPropertyType::RemoteModelName, BluetoothProperty::RemoteAddrType(_) => BtPropertyType::RemoteAddrType, BluetoothProperty::Unknown() => BtPropertyType::Unknown, } Loading Loading @@ -663,7 +661,6 @@ impl BluetoothProperty { BluetoothProperty::RemoteIsCoordinatedSetMember(_) => mem::size_of::<bool>(), BluetoothProperty::Appearance(_) => mem::size_of::<u16>(), BluetoothProperty::VendorProductInfo(_) => mem::size_of::<BtVendorProductInfo>(), BluetoothProperty::RemoteModelName(name) => name.len(), BluetoothProperty::RemoteAddrType(_) => mem::size_of::<BtAddrType>(), // TODO(abps) - Figure out sizes for these Loading Loading @@ -773,9 +770,6 @@ impl BluetoothProperty { }; data.copy_from_slice(&slice); } BluetoothProperty::RemoteModelName(name) => { data.copy_from_slice(name.as_bytes()); } BluetoothProperty::RemoteAddrType(addr_type) => { data.copy_from_slice( &BtAddrType::to_u32(addr_type).unwrap_or_default().to_ne_bytes(), Loading Loading @@ -857,9 +851,6 @@ impl From<bindings::bt_property_t> for BluetoothProperty { let v = unsafe { (prop.val as *const BtVendorProductInfo).read_unaligned() }; BluetoothProperty::VendorProductInfo(BtVendorProductInfo::from(v)) } BtPropertyType::RemoteModelName => { BluetoothProperty::RemoteModelName(ascii_to_string(slice, len)) } BtPropertyType::RemoteAddrType => BluetoothProperty::RemoteAddrType( BtAddrType::from_u32(u32_from_bytes(slice)).unwrap_or(BtAddrType::Unknown), ), Loading Loading
system/gd/rust/linux/client/src/command_handler.rs +0 −4 Original line number Diff line number Diff line Loading @@ -889,7 +889,6 @@ impl CommandHandler { uuids, wake_allowed, dual_mode_audio, le_audio_stable, ) = { let ctx = self.lock_context(); let adapter = ctx.adapter_dbus.as_ref().unwrap(); Loading @@ -909,7 +908,6 @@ impl CommandHandler { let uuids = adapter.get_remote_uuids(device.clone()); let wake_allowed = adapter.get_remote_wake_allowed(device.clone()); let dual_mode_audio = adapter.is_dual_mode_audio_sink_device(device.clone()); let le_audio_stable = adapter.is_le_audio_stable(device.clone()); ( name, Loading @@ -923,7 +921,6 @@ impl CommandHandler { uuids, wake_allowed, dual_mode_audio, le_audio_stable, ) }; Loading @@ -938,7 +935,6 @@ impl CommandHandler { print_info!("Bond State: {:?}", bonded); print_info!("Connection State: {}", connection_state); print_info!("Dual Mode Audio Device: {}", dual_mode_audio); print_info!("Is LE Audio Stable: {}", le_audio_stable); print_info!( "Uuids: {}", DisplayList( Loading
system/gd/rust/linux/client/src/dbus_iface.rs +0 −5 Original line number Diff line number Diff line Loading @@ -1037,11 +1037,6 @@ impl IBluetooth for BluetoothDBus { dbus_generated!() } #[dbus_method("IsLEAudioStable")] fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { dbus_generated!() } #[dbus_method("GetDumpsys")] fn get_dumpsys(&self) -> String { dbus_generated!() Loading
system/gd/rust/linux/service/src/iface_bluetooth.rs +0 −5 Original line number Diff line number Diff line Loading @@ -768,11 +768,6 @@ impl IBluetooth for IBluetoothDBus { dbus_generated!() } #[dbus_method("IsLEAudioStable", DBusLog::Disable)] fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { dbus_generated!() } #[dbus_method("GetDumpsys", DBusLog::Disable)] fn get_dumpsys(&self) -> String { dbus_generated!() Loading
system/gd/rust/linux/stack/src/bluetooth.rs +1 −18 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ use bt_topshim::{ }, profiles::sdp::{BtSdpRecord, Sdp, SdpCallbacks, SdpCallbacksDispatcher}, profiles::ProfileConnectionState, sysprop, topstack, topstack, }; use bt_utils::array_utils; Loading Loading @@ -266,9 +266,6 @@ pub trait IBluetooth { /// LE Audio sink roles). fn is_dual_mode_audio_sink_device(&self, device: BluetoothDevice) -> bool; /// Returns whether the remote device is LE audio stable. fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool; /// Gets diagnostic output. fn get_dumpsys(&self) -> String; } Loading Loading @@ -3007,20 +3004,6 @@ impl IBluetooth for Bluetooth { }) } fn is_le_audio_stable(&self, device: BluetoothDevice) -> bool { let model_name = match self.get_remote_device_property(&device, &BtPropertyType::RemoteModelName) { Some(BluetoothProperty::RemoteModelName(name)) => name, _ => { return false; } }; sysprop::get_string(sysprop::PropertyString::LeAudioAllowList) .split(",") .any(|model| model == model_name) } fn get_dumpsys(&self) -> String { OpenOptions::new() .write(true) Loading
system/gd/rust/topshim/src/btif.rs +1 −10 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ pub enum BtPropertyType { // Unimplemented: // BT_PROPERTY_REMOTE_ASHA_CAPABILITY, // BT_PROPERTY_REMOTE_ASHA_TRUNCATED_HISYNCID, RemoteModelName = 0x17, // BT_PROPERTY_REMOTE_MODEL_NUM, RemoteAddrType = 0x18, Unknown = 0xFE, Loading Loading @@ -586,7 +586,6 @@ pub enum BluetoothProperty { RemoteIsCoordinatedSetMember(bool), Appearance(u16), VendorProductInfo(BtVendorProductInfo), RemoteModelName(String), RemoteAddrType(BtAddrType), RemoteDeviceTimestamp(), Loading Loading @@ -631,7 +630,6 @@ impl BluetoothProperty { BluetoothProperty::Appearance(_) => BtPropertyType::Appearance, BluetoothProperty::VendorProductInfo(_) => BtPropertyType::VendorProductInfo, BluetoothProperty::RemoteDeviceTimestamp() => BtPropertyType::RemoteDeviceTimestamp, BluetoothProperty::RemoteModelName(_) => BtPropertyType::RemoteModelName, BluetoothProperty::RemoteAddrType(_) => BtPropertyType::RemoteAddrType, BluetoothProperty::Unknown() => BtPropertyType::Unknown, } Loading Loading @@ -663,7 +661,6 @@ impl BluetoothProperty { BluetoothProperty::RemoteIsCoordinatedSetMember(_) => mem::size_of::<bool>(), BluetoothProperty::Appearance(_) => mem::size_of::<u16>(), BluetoothProperty::VendorProductInfo(_) => mem::size_of::<BtVendorProductInfo>(), BluetoothProperty::RemoteModelName(name) => name.len(), BluetoothProperty::RemoteAddrType(_) => mem::size_of::<BtAddrType>(), // TODO(abps) - Figure out sizes for these Loading Loading @@ -773,9 +770,6 @@ impl BluetoothProperty { }; data.copy_from_slice(&slice); } BluetoothProperty::RemoteModelName(name) => { data.copy_from_slice(name.as_bytes()); } BluetoothProperty::RemoteAddrType(addr_type) => { data.copy_from_slice( &BtAddrType::to_u32(addr_type).unwrap_or_default().to_ne_bytes(), Loading Loading @@ -857,9 +851,6 @@ impl From<bindings::bt_property_t> for BluetoothProperty { let v = unsafe { (prop.val as *const BtVendorProductInfo).read_unaligned() }; BluetoothProperty::VendorProductInfo(BtVendorProductInfo::from(v)) } BtPropertyType::RemoteModelName => { BluetoothProperty::RemoteModelName(ascii_to_string(slice, len)) } BtPropertyType::RemoteAddrType => BluetoothProperty::RemoteAddrType( BtAddrType::from_u32(u32_from_bytes(slice)).unwrap_or(BtAddrType::Unknown), ), Loading