From 42b85abe9c5e2608a79dfc9d8ebd37ab47317ccd Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Mon, 20 Nov 2023 14:28:41 +0800 Subject: [PATCH] Minor handle refine for setLowLatencyModeAllowed setLowLatencyModeAllowed API is only used for A2DP offload session. For this case, we shouldn't report ReportLowLatencyModeAllowedChanged callback for the other session Bug: 270987427 Test: atest VtsHalBluetoothAudioTargetTest Change-Id: I1991ee93b3523717c6ca26b1638e34a196253a5b --- bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp index e5cf53c153..c283148a38 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp @@ -439,6 +439,9 @@ void BluetoothAudioSession::ReportControlStatus(bool start_resp, } void BluetoothAudioSession::ReportLowLatencyModeAllowedChanged(bool allowed) { + if (session_type_ != SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { + return; + } std::lock_guard guard(mutex_); low_latency_allowed_ = allowed; // TODO(b/294498919): Remove this after there is API to update latency mode