Use MAP Client UUIDs isProfileSupported
When a remote device issues a conection before SDP has completed, the profile connection state changes can cause other logic to think its a good time to connect the rest of the profiles. Because SDP isn't completed, there's not remote UUIDs. Plus, because an outgoing connect call hadn't been made before, there's no default connection policy values set. Connect calls into connectAllSupportedProfiles, which uses isProfileSupported to determine co-supported profiles. Despite not having UUIDs, MAP Client returns true erroneously. This causes MAP Client to connect and have connection policy set. As a result, Future connect calls no longer call into connectAllSupportedProfiles and instead call into connectEnabledProfiles, which only connects MAP. To make matters worse, most phones struggle to connect MAP due to permissions models. The fix is to actually use the UUIDs for MAP. That way, the lack of UUIDs won't cause MAP to connect and a connection policy to be set. Tag: #stability Bug: 235140654 Test: atest BluetoothInstrumentationTests Change-Id: I4d091b40407561156edc92ba8eb2b85e29e2121e
Loading
Please register or sign in to comment