floss: Refactor btstack initialization order (2/4 BluetoothAdmin)
This patch does: - Move the toggle_enabled_profiles functionality from Bluetooth to BluetoothAdmin. The reason is that the function makes BluetoothMedia a deep dependency of Bluetooth. - BluetoothAdmin now depends on Bluetooth, BluetoothMedia, and SocketManager. It is initialized after adapter is ready and directly invokes handle_admin_policy_changed when policy is init-ed/changed. - BluetoothAdmin now listens to Bluetooth's device events through the callback system. Some backgrounds: We want to get rid of the redundant `Option` of the topshim objects that is causing many verbosities and confusing snippets (We all know we can't do anything without the objects... Then why is it optional?). The overall direction is to remove all Bluetooth's dependencies on initialization, because the Bluetooth topshim object needs to be initialized first before all other topshim objects can be obtained. Bug: 254870880 Tag: #floss Test: mmm packages/modules/Bluetooth Test: bluetooth_AdapterEPHealth.all_floss Flag: EXEMPT, Floss-only changes Change-Id: Ib0871d738675f1370cc6469106fa7f087a296557
Loading
Please register or sign in to comment