Loading system/gd/rust/linux/stack/src/bluetooth_gatt.rs +9 −3 Original line number Diff line number Diff line Loading @@ -787,7 +787,10 @@ impl BluetoothGattService { } } fn from_db(elements: Vec<BtGattDbElement>) -> Vec<BluetoothGattService> { fn from_db( elements: Vec<BtGattDbElement>, with_included_service: bool, ) -> Vec<BluetoothGattService> { let mut db_out: Vec<BluetoothGattService> = vec![]; for elem in elements { Loading Loading @@ -836,6 +839,9 @@ impl BluetoothGattService { } GattDbElementType::IncludedService => { if !with_included_service { continue; } match db_out.last_mut() { Some(s) => { s.included_services.push(BluetoothGattService::new( Loading Loading @@ -3340,7 +3346,7 @@ impl BtifGattClientCallbacks for BluetoothGatt { |cb: &mut GattClientCallback| { cb.on_search_complete( addr.to_string(), BluetoothGattService::from_db(elements), BluetoothGattService::from_db(elements, true), GattStatus::Success, ); Some(()) Loading Loading @@ -3645,7 +3651,7 @@ impl BtifGattServerCallbacks for BluetoothGatt { elements: Vec<BtGattDbElement>, _count: usize, ) { for service in BluetoothGattService::from_db(elements) { for service in BluetoothGattService::from_db(elements, false) { if status == GattStatus::Success { self.server_context_map.add_service(server_id, service.clone()); } Loading Loading
system/gd/rust/linux/stack/src/bluetooth_gatt.rs +9 −3 Original line number Diff line number Diff line Loading @@ -787,7 +787,10 @@ impl BluetoothGattService { } } fn from_db(elements: Vec<BtGattDbElement>) -> Vec<BluetoothGattService> { fn from_db( elements: Vec<BtGattDbElement>, with_included_service: bool, ) -> Vec<BluetoothGattService> { let mut db_out: Vec<BluetoothGattService> = vec![]; for elem in elements { Loading Loading @@ -836,6 +839,9 @@ impl BluetoothGattService { } GattDbElementType::IncludedService => { if !with_included_service { continue; } match db_out.last_mut() { Some(s) => { s.included_services.push(BluetoothGattService::new( Loading Loading @@ -3340,7 +3346,7 @@ impl BtifGattClientCallbacks for BluetoothGatt { |cb: &mut GattClientCallback| { cb.on_search_complete( addr.to_string(), BluetoothGattService::from_db(elements), BluetoothGattService::from_db(elements, true), GattStatus::Success, ); Some(()) Loading Loading @@ -3645,7 +3651,7 @@ impl BtifGattServerCallbacks for BluetoothGatt { elements: Vec<BtGattDbElement>, _count: usize, ) { for service in BluetoothGattService::from_db(elements) { for service in BluetoothGattService::from_db(elements, false) { if status == GattStatus::Success { self.server_context_map.add_service(server_id, service.clone()); } Loading