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

Commit a221e4b4 authored by Jack He's avatar Jack He
Browse files

HFP: Fix NPE in error logging for voice recognition events

Bug: 72506800
Test: make and test with VREC events
Change-Id: I126b75d9e991b312e795ed38672b0153ca03dcea
parent 47bee278
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -782,7 +782,7 @@ bt_status_t HeadsetInterface::StartVoiceRecognition(RawAddress* bd_addr) {
  }
  if (!(btif_hf_cb[idx].peer_feat & BTA_AG_PEER_FEAT_VREC)) {
    BTIF_TRACE_ERROR("%s: voice recognition not supported, features=0x%x",
                     btif_hf_cb[idx].peer_feat);
                     __func__, btif_hf_cb[idx].peer_feat);
    return BT_STATUS_UNSUPPORTED;
  }
  tBTA_AG_RES_DATA ag_res = {};
@@ -806,7 +806,7 @@ bt_status_t HeadsetInterface::StopVoiceRecognition(RawAddress* bd_addr) {
  }
  if (!(btif_hf_cb[idx].peer_feat & BTA_AG_PEER_FEAT_VREC)) {
    BTIF_TRACE_ERROR("%s: voice recognition not supported, features=0x%x",
                     btif_hf_cb[idx].peer_feat);
                     __func__, btif_hf_cb[idx].peer_feat);
    return BT_STATUS_UNSUPPORTED;
  }
  tBTA_AG_RES_DATA ag_res = {};