Fix A2DP not connecting while asleep.
Some BlueTooth devices will initiate a HFP connection, and then leave it to the phone to initiate A2DP. This was handled with MESSAGE_CONNECT_TO. However, this was sent using mHandler.sendMessageDelayed, which won't wake the phone if it's asleep. This caused some BT devices to cleanly connect using HFP, but to not connect A2DP until the phone is manually woken up to allow the MESSAGE_CONNECT_TO message to be delivered. Replace this message with an AlarmManager alarm, which will wake the device properly. Improves connection with Sony MEX-BT3800U. (Connecting is still not completely reliable; connecting sometimes still mysteriously fails, but this helps a lot.)
Loading
Please register or sign in to comment