Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c732e883 authored by Yasuyoshi Terui's avatar Yasuyoshi Terui Committed by Myles Watson
Browse files

Add to receive BTHF_CALL_STATE_DISCONNECTED at HFP

When the call is disconnected, the BTHF state is changed to IDLE and
SCO connection is disconnected before playing disconnect tone. So the
disconnect tone can't be sound from BTHS.

Add DISCONNECTED state for HFP and keep the state until disconnect tone
sounds from BT.

Test: manual - Checked whether the disconnect tone is sound from the BTHS
Bug: 69645337

Change-Id: Id96385e4ce35cfe7d0d4e14b74a2fc1a63165f82
parent e43b237f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ static const char* dump_hf_call_state(bthf_call_state_t call_state) {
    CASE_RETURN_STR(BTHF_CALL_STATE_INCOMING)
    CASE_RETURN_STR(BTHF_CALL_STATE_WAITING)
    CASE_RETURN_STR(BTHF_CALL_STATE_ACTIVE)
    CASE_RETURN_STR(BTHF_CALL_STATE_DISCONNECTED)
    default:
      return "UNKNOWN CALL STATE";
  }
@@ -1201,6 +1202,9 @@ bt_status_t HeadsetInterface::PhoneStateChange(
          ag_res.audio_handle = btif_hf_cb[idx].handle;
        res = BTA_AG_OUT_CALL_ALERT_RES;
        break;
      case BTHF_CALL_STATE_DISCONNECTED:
        res = 0;
        break;
      default:
        BTIF_TRACE_ERROR("%s: Incorrect new ringing call state", __func__);
        status = BT_STATUS_PARM_INVALID;
+2 −1
Original line number Diff line number Diff line
@@ -97,7 +97,8 @@ typedef enum {
  BTHF_CALL_STATE_ALERTING,
  BTHF_CALL_STATE_INCOMING,
  BTHF_CALL_STATE_WAITING,
  BTHF_CALL_STATE_IDLE
  BTHF_CALL_STATE_IDLE,
  BTHF_CALL_STATE_DISCONNECTED
} bthf_call_state_t;

typedef enum {