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

Commit f1527f5a authored by Yuyang Huang's avatar Yuyang Huang
Browse files

Add support for HFP_HARDWARE_OFFLOAD_DATAPATH session type

Bug: 345303008
Change-Id: I0de7fcfaa64ae94e3a78d03685e661c51416ae64
Test: m packages/modules/Bluetooth
Flag: com::android::bluetooth::flags::is_sco_managed_by_audio and HFP session type only enabled when flag is enabled
parent 9daf187e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -139,6 +139,12 @@ void BluetoothAudioSession::ReportAudioConfigChanged(
                  << toString(session_type_);
        return;
      }
    } else if(session_type_ == SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH) {
      if (audio_config.getTag() != AudioConfiguration::hfpConfig) {
        LOG(ERROR) << __func__ << " invalid audio config type for SessionType ="
                  << toString(session_type_);
        return;
      }
    } else {
      LOG(ERROR) << __func__ << " invalid SessionType ="
                 << toString(session_type_);
@@ -154,6 +160,12 @@ void BluetoothAudioSession::ReportAudioConfigChanged(
                   << toString(session_type_);
        return;
      }
    } else if(session_type_ == SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH) {
      if (audio_config.getTag() != AudioConfiguration::hfpConfig) {
        LOG(ERROR) << __func__ << " invalid audio config type for SessionType ="
                  << toString(session_type_);
        return;
      }
    } else {
      LOG(ERROR) << __func__
                 << " invalid SessionType =" << toString(session_type_);