AdapterProperties: Track connection state change from more profiles
* AdapterProperties should handle ACTION_CONNECTION_STATE_CHANGED intent from more profiles * AdapterProperties sends BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED with STATE_CONNECTING and STATE_CONNECTED when first profile send out the same intent, and with STATE_DISCONNECTING and STATE_DISCONNECTED when last profile send out the same intent. * At the same moment, AdapterProperties also update the return value for BluetoothAdapter.getConnectionState() * Currently, we are only tracking HEADSET (HFP), HEADSET_CLIENT (HFP), A2DP, A2DP_SINK profiles, other profiles such as PAN, PBAP, HID profiles are not tracked properly and their state change could be missed by both intent users and BluetoothAdapter.getConnectionState() * After this CL, the following profiles will be tracked: AVRCP_CONTROLLER, A2DP, A2DP_SINK, HEADSET, HEADSET_CLIENT, INPUT_HOST, INPUT_DEVICE, MAP, MAP_CLIENT, PAN, PBAP_CLIENT, SAP Bug: 37546066 Test: make, test connect and disconnect each profiles Change-Id: I2ef0e55f58e6f7891823137e2e4534e97a126c25
Loading
Please register or sign in to comment