diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-08-10 04:00:50 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-08-10 04:00:50 +0000 |
commit | 80069712ff96bc50b54ed1b70d947f9071d5d43b (patch) | |
tree | 6542c65c79c49916b917bd53de7451800ca31daa | |
parent | c36dc6df6fc340f246ece229346cb86714748a52 (diff) | |
parent | 79276a5e333f00bd52a0446b184be81f88a484b7 (diff) | |
download | interfaces-android14-d1-s6-release.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/24365913'] into udc-d1-release.android-14.0.0_r9android-14.0.0_r8android-14.0.0_r7android-14.0.0_r6android-14.0.0_r5android-14.0.0_r4android-14.0.0_r3android-14.0.0_r12android-14.0.0_r11android-14.0.0_r10android14-d1-s7-releaseandroid14-d1-s6-releaseandroid14-d1-s5-releaseandroid14-d1-s4-releaseandroid14-d1-s3-releaseandroid14-d1-s2-releaseandroid14-d1-s1-releaseandroid14-d1-release
Change-Id: I6b2404dbbd1a3660ce8779a029224f975a7b3367
-rw-r--r-- | bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp index ee5527e62d..57a01c9d6f 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp @@ -440,6 +440,16 @@ void BluetoothAudioSession::ReportControlStatus(bool start_resp, void BluetoothAudioSession::ReportLowLatencyModeAllowedChanged(bool allowed) { std::lock_guard<std::recursive_mutex> guard(mutex_); low_latency_allowed_ = allowed; + // TODO(b/294498919): Remove this after there is API to update latency mode + // after audio session started. If low_latency_allowed_ is true, the session + // can support LOW_LATENCY and FREE LatencyMode. + if (low_latency_allowed_) { + if (std::find(latency_modes_.begin(), latency_modes_.end(), + LatencyMode::LOW_LATENCY) == latency_modes_.end()) { + LOG(INFO) << __func__ << " - insert LOW_LATENCY LatencyMode"; + latency_modes_.push_back(LatencyMode::LOW_LATENCY); + } + } if (observers_.empty()) { LOG(WARNING) << __func__ << " - SessionType=" << toString(session_type_) << " has NO port state observer"; |