OSDN Git Service

HF Client: Handle errors for CGMI, CGMM in the stack
authorSatish Kodishala <skodisha@codeaurora.org>
Tue, 6 Oct 2015 15:42:14 +0000 (21:12 +0530)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:09:24 +0000 (08:09 -0600)
AT+CGMI=? and AT+CGMM=? commands are sent from stack to
the AG in post SLC sequence. We are upstreaming errors
returned from AG for these commands to
HeadsetClientStateMachine. This leads to state mismatch
in state machine.

CRs-fixed: 919514
Change-Id: I4acb32d3c1dd78ba3de3b60fb029268b307199f7

bta/hf_client/bta_hf_client_at.c

index db63140..d54327d 100644 (file)
@@ -260,12 +260,14 @@ static void bta_hf_client_handle_ok()
     {
         case BTA_HF_CLIENT_AT_BIA:
         case BTA_HF_CLIENT_AT_BCC:
+        case BTA_HF_CLIENT_AT_CGMI:
+        case BTA_HF_CLIENT_AT_CGMM:
             break;
         case BTA_HF_CLIENT_AT_BCS:
             bta_hf_client_start_at_hold_timer();
             bta_hf_client_cb.scb.at_cb.current_cmd = BTA_HF_CLIENT_AT_NONE;
             return;
-        case BTA_HF_CLIENT_AT_CLIP: //last cmd is post slc seq
+        case BTA_HF_CLIENT_AT_CLIP:
             if (bta_hf_client_cb.scb.send_at_reply == FALSE)
             {
                 bta_hf_client_cb.scb.send_at_reply = TRUE;
@@ -274,7 +276,7 @@ static void bta_hf_client_handle_ok()
         case BTA_HF_CLIENT_AT_CGMI_QUERY:
             bta_hf_client_send_at_cgmi(FALSE);
             break;
-        case BTA_HF_CLIENT_AT_CGMM_QUERY:
+        case BTA_HF_CLIENT_AT_CGMM_QUERY:  //last cmd in post slc seq
             bta_hf_client_send_at_cgmm(FALSE);
             break;
         case BTA_HF_CLIENT_AT_NONE:
@@ -308,12 +310,13 @@ static void bta_hf_client_handle_error(tBTA_HF_CLIENT_AT_RESULT_TYPE type, UINT1
     switch(bta_hf_client_cb.scb.at_cb.current_cmd)
     {
         case BTA_HF_CLIENT_AT_BIA:
+        case BTA_HF_CLIENT_AT_CGMI_QUERY:
             break;
         case BTA_HF_CLIENT_AT_BCC:
         case BTA_HF_CLIENT_AT_BCS:
             bta_hf_client_cback_sco(BTA_HF_CLIENT_AUDIO_CLOSE_EVT);
             break;
-        case BTA_HF_CLIENT_AT_CLIP: //last cmd is post slc seq
+        case BTA_HF_CLIENT_AT_CGMM_QUERY: //last cmd in post slc seq
             if (bta_hf_client_cb.scb.send_at_reply == FALSE)
             {
                 bta_hf_client_cb.scb.send_at_reply = TRUE;