Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c9ddd8aa authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

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
parent 59c72539
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment