{"push_id":744870501,"size":2,"distinct_size":1,"ref":"refs/heads/cm-12.1_4412","head":"d05ae3c0f3d855b9e417d366a5329b2ef0f5a31e","before":"900d4d3be31820ebef0994f4f33e32e5c9deb164","commits":[{"sha":"3ccce524f1264d3fb30bd3078986428a21f3ef97","author":{"email":"fa6518d7ce0f7b4a85c27984f5614ea32a633350@gmail.com","name":"Markus Schmidt"},"message":"Bluetooth losing HF connection to car-kit after 5 seconds\n\nThis patch adresses a change in bluetooth which causes a possible\nloss of connection within 5 seconds after connecting.  This new\nbehavior appeared with android 4.2 (4.1.2 worked fine in this regard).\n\nI traced down the disconnects to an BTA_AG_SVC_TOUT_EVT via a timer\nthat checks if a service connection was made within a few seconds.\nEssentially bta_ag_svc_conn_open() was not called on AT+CMER because\nandroid thought the car kit supported 3WAY but the car kit did not\nset the 3WAY flag via AT commands and did not send AT+CHLD either.\nAndroid otoh used the flag obtained by SDP and expected 3WAY behavior\nand eventually disconnected when AT+CHLD did not arrive.\n\nThis may be a bordeline case, because in the Bluetooth Specification\n(page 20), assuming service level initialization via SDP is only\nmentioned on the HF side while there is no such mention (but could\nprobably be implied) on page 21 for the AG.\n\nFact is however, that the use of SDP features value for peer_features\nis new since Android 4.2 and breaks existing good behavior on a BMW\n2005/E46 car kit (navi professional). This kit never asks for AT+CHLD\nand never via AT commands suggests it supports 3WAY (although it seems\nto have the flag set via SDP).\n\nAlso, having essential behavior (like making the connection or not)\ndepend on circumstances that may be prone to race conditions, may be\na good reason to not use the SDP flag also (or at least masking out\nthe 3WAY bit when using it).\n\n(An alternative approach could be to hook into bta_ag_timer_cback() and\nwhen the timer exipres, but when also AT+CMER has been seen meanwhile,\nto continue and assume a service level connection without 3WAY,\ni.e. clearing the 3-way flags but calling bta_ag_svc_conn_open() anyway.)\n\nChange-Id: I95dcdc5f46e7af723a655afd3d707764603c96c3\nSigned-off-by: Markus Schmidt <shimodax@gmail.com>\n(cherry picked from commit 662eaddd47bca1de03018fbcbe57ca2bfabaa5ac)","distinct":false,"url":"https://api.github.com/repos/voodik/android_external_bluetooth_bluedroid/commits/3ccce524f1264d3fb30bd3078986428a21f3ef97"},{"sha":"d05ae3c0f3d855b9e417d366a5329b2ef0f5a31e","author":{"email":"465cf06cce96c75a908dcf32f8ceb6c17c3e72ed@gmail.com","name":"root"},"message":"Merge remote-tracking branch 'upstream/cm-12.1' into cm-12.1_4412","distinct":true,"url":"https://api.github.com/repos/voodik/android_external_bluetooth_bluedroid/commits/d05ae3c0f3d855b9e417d366a5329b2ef0f5a31e"}]}