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

Commit f4c99c05 authored by Ray Kuo's avatar Ray Kuo
Browse files

BQR: Fix for the issue that Bluetooth keeps on crashing if the

controller firmware does not support the BQR feature.

Considering for the Treble case, it might upgrade the system image
only and the BQR feature will be enabled on a device whose Bluetooth
controller firmware does not support the BQR feature. The change is
not to crash the system if the controller firmware does not handle the
BQR VSC.

Bug: 129037162
Test: Enabled the BQR feature on the device whose Bluetooth controller
firmware does not support the BQR feature. The Bluetooth can be turned
on and works normally.

Change-Id: I6e9310a2b604679ba300e558ae4482887501e022
parent c0cbaa44
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -243,8 +243,7 @@ void EnableBtQualityReport(bool is_enable) {

void BqrVscCompleteCallback(tBTM_VSC_CMPL* p_vsc_cmpl_params) {
  if (p_vsc_cmpl_params->param_len < 1) {
    LOG(FATAL) << __func__
               << ": The length of returned parameters is less than 1";
    LOG(ERROR) << __func__ << ": The length of returned parameters is less than 1";
    return;
  }

@@ -255,8 +254,7 @@ void BqrVscCompleteCallback(tBTM_VSC_CMPL* p_vsc_cmpl_params) {
  // Current_Quality_Event_Mask | 4 octets | Indicates current bit mask setting
  STREAM_TO_UINT8(status, p_event_param_buf);
  if (status != HCI_SUCCESS) {
    LOG(FATAL) << __func__
               << ": Fail to configure BQR. status: " << loghex(status);
    LOG(ERROR) << __func__ << ": Fail to configure BQR. status: " << loghex(status);
    return;
  }