OSDN Git Service

HSP: Keep sending RING message
authorChenyang Zhang <chenyang.x.zhang@sony.com>
Mon, 26 Mar 2018 03:21:59 +0000 (11:21 +0800)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 24 Apr 2018 22:41:28 +0000 (22:41 +0000)
Two PTS Test failed:
- HSP/AG/IAC/BV-01-I
- HSP/AG/ACR/BV-02-I

Reason:
AG didn't send the "RING" unsolicited result code to HS(PTS),
then HS can't send the "AT+CKPD=200" command to received the call.
After a while, the "FATAL ERROR (MTC): Call establishment timed out"
triggered by PTS.

Solution:
Keep sending RING message for HSP.

Bug: 77507028
Change-Id: If1288a5f7b1b7da8ecba34ed90a85a0af8a91e9a

bta/ag/bta_ag_cmd.cc

index c162509..a897cfe 100644 (file)
@@ -1757,7 +1757,8 @@ void bta_ag_send_bcs(tBTA_AG_SCB* p_scb) {
  ******************************************************************************/
 void bta_ag_send_ring(tBTA_AG_SCB* p_scb,
                       UNUSED_ATTR const tBTA_AG_DATA& data) {
-  if (p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING) {
+  if ((p_scb->conn_service == BTA_AG_HFP) &&
+      p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING) {
     APPL_TRACE_DEBUG("%s: don't send the ring since there is no MT call setup",
                      __func__);
     return;