Loading system/gd/metrics/chromeos/metrics_event.cc +4 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,10 @@ static std::pair<uint32_t, uint32_t> ToProfileConnectionState(uint32_t profile, case BthhConnectionState::BTHH_CONN_STATE_DISCONNECTING: output.second = (uint32_t)ProfilesConnectionState::DISCONNECTING; break; case BthhConnectionState::BTHH_CONN_STATE_ACCEPTING: // For metric purpose, we map accepting to connecting. output.second = (uint32_t)ProfilesConnectionState::CONNECTING; break; case BthhConnectionState::BTHH_CONN_STATE_UNKNOWN: output.second = (uint32_t)ProfilesConnectionState::UNKNOWN; break; Loading system/gd/rust/linux/stack/src/bluetooth.rs +13 −1 Original line number Diff line number Diff line Loading @@ -2789,10 +2789,15 @@ impl IBluetooth for Bluetooth { // TODO(b/328675014): Use BtAddrType // and BtTransport from // BluetoothDevice instead of default // TODO(b/329837967): Determine // correct reconnection behavior based // on device instead of the default self.hh.as_ref().unwrap().disconnect( &mut addr.unwrap(), BtAddrType::Public, BtTransport::Auto, /*reconnect_allowed=*/ true, ); } Loading Loading @@ -2970,7 +2975,14 @@ impl BtifHHCallbacks for Bluetooth { "[{}]: Rejecting a unbonded device's attempt to connect to HID/HOG profiles", DisplayAddress(&address) ); self.hh.as_ref().unwrap().disconnect(&mut address, address_type, transport); // TODO(b/329837967): Determine correct reconnection // behavior based on device instead of the default self.hh.as_ref().unwrap().disconnect( &mut address, address_type, transport, /*reconnect_allowed=*/ true, ); } } Loading system/gd/rust/topshim/src/profiles/hid_host.rs +4 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ pub enum BthhConnectionState { Connecting, Disconnected, Disconnecting, Accepting, Unknown = 0xff, } Loading Loading @@ -255,6 +256,7 @@ impl HidHost { addr: &mut RawAddress, address_type: BtAddrType, transport: BtTransport, reconnect_allowed: bool, ) -> BtStatus { let addr_ptr = LTCheckedPtrMut::from_ref(addr); BtStatus::from(ccall!( Loading @@ -262,7 +264,8 @@ impl HidHost { disconnect, addr_ptr.into(), address_type.into(), transport.into() transport.into(), reconnect_allowed )) } Loading Loading
system/gd/metrics/chromeos/metrics_event.cc +4 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,10 @@ static std::pair<uint32_t, uint32_t> ToProfileConnectionState(uint32_t profile, case BthhConnectionState::BTHH_CONN_STATE_DISCONNECTING: output.second = (uint32_t)ProfilesConnectionState::DISCONNECTING; break; case BthhConnectionState::BTHH_CONN_STATE_ACCEPTING: // For metric purpose, we map accepting to connecting. output.second = (uint32_t)ProfilesConnectionState::CONNECTING; break; case BthhConnectionState::BTHH_CONN_STATE_UNKNOWN: output.second = (uint32_t)ProfilesConnectionState::UNKNOWN; break; Loading
system/gd/rust/linux/stack/src/bluetooth.rs +13 −1 Original line number Diff line number Diff line Loading @@ -2789,10 +2789,15 @@ impl IBluetooth for Bluetooth { // TODO(b/328675014): Use BtAddrType // and BtTransport from // BluetoothDevice instead of default // TODO(b/329837967): Determine // correct reconnection behavior based // on device instead of the default self.hh.as_ref().unwrap().disconnect( &mut addr.unwrap(), BtAddrType::Public, BtTransport::Auto, /*reconnect_allowed=*/ true, ); } Loading Loading @@ -2970,7 +2975,14 @@ impl BtifHHCallbacks for Bluetooth { "[{}]: Rejecting a unbonded device's attempt to connect to HID/HOG profiles", DisplayAddress(&address) ); self.hh.as_ref().unwrap().disconnect(&mut address, address_type, transport); // TODO(b/329837967): Determine correct reconnection // behavior based on device instead of the default self.hh.as_ref().unwrap().disconnect( &mut address, address_type, transport, /*reconnect_allowed=*/ true, ); } } Loading
system/gd/rust/topshim/src/profiles/hid_host.rs +4 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ pub enum BthhConnectionState { Connecting, Disconnected, Disconnecting, Accepting, Unknown = 0xff, } Loading Loading @@ -255,6 +256,7 @@ impl HidHost { addr: &mut RawAddress, address_type: BtAddrType, transport: BtTransport, reconnect_allowed: bool, ) -> BtStatus { let addr_ptr = LTCheckedPtrMut::from_ref(addr); BtStatus::from(ccall!( Loading @@ -262,7 +264,8 @@ impl HidHost { disconnect, addr_ptr.into(), address_type.into(), transport.into() transport.into(), reconnect_allowed )) } Loading