floss: Restore HCI enabled state on new HCI presence
Originally, btmanagerd only restores the enabled state on the ReadIndexList Complete Event. However, the first ReadIndexList after reboot is usually empty and the HciDevicePresence is caused by the later IndexAdded event. Instead of sending StartBluetooth message on MGMT event, this patch load the previous state from disk on a new HCI device presents. The handler of HciDevicePresence shall then start the adapter if floss is enabled. This patch also fixes an issue that start_hci_if_floss_enabled is passed a real HCI index while it actually wants virtual. Bug: 302495893 Test: mmm -j packages/modules/Bluetooth Test: Verified btadapterd is started on IndexAdded MGMT event on reboot Change-Id: I43f73dc45ab822614e072f9555e290a7cb5f4e6f
Loading
Please register or sign in to comment