floss: Refactor manager state machine
The manager state machine was lacking for a few reasons: * Missing adapter present indicator * Missing floss enabled indicator * Logic distributed in multiple locations This refactor aims to do a few things: * Make sure the state machine is aware of HCI device presence when making state decisions. * Make sure the state machine is aware of whether floss is enabled. * Centralize logic to the state machine internals and improve tests. A few major changes here: * BluetoothManagerContext was removed entirely (superfluous). * ManagerStateMachine was renamed StateMachineInternal. * Floss enabled was moved into StateMachineInternal. * New action handler was added: action_on_hci_presence_changed. * Several actions were refactored to care about presence and floss_enabled. Bug: 226644782 Bug: 228905413 Tag: #floss Test: Unit tests ran and manually verified on ChromeOS. Change-Id: Icd416b7e8d8f690c832f8c67c6c1bf6d8352cc99
Loading
Please register or sign in to comment