A2DP: Be more careful in allocating a BtifAvPeer instance
While a new peer is coming either by in-coming or out-going connection, the stack first tries to find or create an associated BtifAvPeer object for it, but uses an unknown BTA handle if BTA_AV is still registering. This handle will be updated after BTA_AV registered, but causes a mismatch in the handle usage between BTIF and BTA layers since the register process just finished. This change disallows to use an unknown BTA handle, so it prevents such abnormal cases. Besides, it adds more log messages about BTA_AV registering, and also makes sure the disabling flag won't be activated after disabled. Bug: 135655859 Bug: 152597903 Test: Switch BT state quickly between STATE_BLE_ON and STATE_ON Change-Id: I9df3d64f301dffbecdeaf3de18dd455be1c63ce2 Merged-In: I9df3d64f301dffbecdeaf3de18dd455be1c63ce2 (cherry picked from commit 714e639cb7291ecfb9feb12acad9bc7c8f455ba0)
Loading
Please register or sign in to comment
