Loading system/btif/src/btif_dm.cc +13 −0 Original line number Diff line number Diff line Loading @@ -1306,6 +1306,19 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event, pairing_cb.eir_uuids[i] = uuid.To128BitBE(); pairing_cb.num_eir_uuids++; } #if TARGET_FLOSS // Floss expects that EIR uuids are immediately reported when the // device is found and doesn't wait for the pairing intent. // // If a subsequent SDP is completed, the new UUIDs should replace the // existing UUIDs. BTIF_STORAGE_FILL_PROPERTY( &properties[num_properties], BT_PROPERTY_UUIDS, pairing_cb.num_eir_uuids * Uuid::kNumBytes128, pairing_cb.eir_uuids); num_properties++; #endif } status = Loading system/gd/rust/linux/client/src/command_handler.rs +3 −2 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ impl CommandHandler { DisplayList( uuids .iter() .map(|&x| UuidHelper::to_string(&x)) .map(|&x| uuid_helper.known_uuid_to_string(&x)) .collect::<Vec<String>>() ) ); Loading Loading @@ -529,6 +529,7 @@ impl CommandHandler { (name, alias, device_type, class, bonded, connected, uuids) }; let uuid_helper = UuidHelper::new(); print_info!("Address: {}", &device.address); print_info!("Name: {}", name); print_info!("Alias: {}", alias); Loading @@ -541,7 +542,7 @@ impl CommandHandler { DisplayList( uuids .iter() .map(|&x| UuidHelper::to_string(&x)) .map(|&x| uuid_helper.known_uuid_to_string(&x)) .collect::<Vec<String>>() ) ); Loading system/gd/rust/linux/stack/src/uuid.rs +19 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,15 @@ impl<'a> Display for UuidWrapper<'a> { } } pub struct KnownUuidWrapper<'a>(pub &'a Uuid128Bit, pub &'a Profile); impl<'a> Display for KnownUuidWrapper<'a> { fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { let _ = Uuid::format(&self.0, f); write!(f, ": {:?}", self.1) } } pub struct UuidHelper { /// A list of enabled profiles on the system. These may be modified by policy. pub enabled_profiles: HashSet<Profile>, Loading Loading @@ -165,6 +174,16 @@ impl UuidHelper { UuidWrapper(&uuid).to_string() } /// If a uuid is known to be a certain service, convert it into a formatted /// string that shows the service name. Else just format the uuid. pub fn known_uuid_to_string(&self, uuid: &Uuid128Bit) -> String { if let Some(p) = self.is_known_profile(uuid) { return KnownUuidWrapper(&uuid, &p).to_string(); } UuidHelper::to_string(uuid) } /// Converts a well-formatted UUID string to a UUID byte array. /// The UUID string should be in the format: /// 12345678-1234-1234-1234-1234567890 Loading Loading
system/btif/src/btif_dm.cc +13 −0 Original line number Diff line number Diff line Loading @@ -1306,6 +1306,19 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event, pairing_cb.eir_uuids[i] = uuid.To128BitBE(); pairing_cb.num_eir_uuids++; } #if TARGET_FLOSS // Floss expects that EIR uuids are immediately reported when the // device is found and doesn't wait for the pairing intent. // // If a subsequent SDP is completed, the new UUIDs should replace the // existing UUIDs. BTIF_STORAGE_FILL_PROPERTY( &properties[num_properties], BT_PROPERTY_UUIDS, pairing_cb.num_eir_uuids * Uuid::kNumBytes128, pairing_cb.eir_uuids); num_properties++; #endif } status = Loading
system/gd/rust/linux/client/src/command_handler.rs +3 −2 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ impl CommandHandler { DisplayList( uuids .iter() .map(|&x| UuidHelper::to_string(&x)) .map(|&x| uuid_helper.known_uuid_to_string(&x)) .collect::<Vec<String>>() ) ); Loading Loading @@ -529,6 +529,7 @@ impl CommandHandler { (name, alias, device_type, class, bonded, connected, uuids) }; let uuid_helper = UuidHelper::new(); print_info!("Address: {}", &device.address); print_info!("Name: {}", name); print_info!("Alias: {}", alias); Loading @@ -541,7 +542,7 @@ impl CommandHandler { DisplayList( uuids .iter() .map(|&x| UuidHelper::to_string(&x)) .map(|&x| uuid_helper.known_uuid_to_string(&x)) .collect::<Vec<String>>() ) ); Loading
system/gd/rust/linux/stack/src/uuid.rs +19 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,15 @@ impl<'a> Display for UuidWrapper<'a> { } } pub struct KnownUuidWrapper<'a>(pub &'a Uuid128Bit, pub &'a Profile); impl<'a> Display for KnownUuidWrapper<'a> { fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { let _ = Uuid::format(&self.0, f); write!(f, ": {:?}", self.1) } } pub struct UuidHelper { /// A list of enabled profiles on the system. These may be modified by policy. pub enabled_profiles: HashSet<Profile>, Loading Loading @@ -165,6 +174,16 @@ impl UuidHelper { UuidWrapper(&uuid).to_string() } /// If a uuid is known to be a certain service, convert it into a formatted /// string that shows the service name. Else just format the uuid. pub fn known_uuid_to_string(&self, uuid: &Uuid128Bit) -> String { if let Some(p) = self.is_known_profile(uuid) { return KnownUuidWrapper(&uuid, &p).to_string(); } UuidHelper::to_string(uuid) } /// Converts a well-formatted UUID string to a UUID byte array. /// The UUID string should be in the format: /// 12345678-1234-1234-1234-1234567890 Loading