From deecabbd9cc5c13322ddaf167d41dbafc0435876 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Mon, 8 Jan 2024 13:55:01 +0000 Subject: [PATCH] Fix LeAudioCodecProvider failing offload setting file parsing ParseFromLeAudioOffloadSettingFile() fails when `GetLeAudioCodecCapabilities()` was already called in the past and `leAudioCodecCapabilities` vector is already populated. That makes some of the VTS tests fail on `IsOffloadOutputProviderInfoSupported()` and just return and PASS without actually checking enything. The doubtful checks check variables set at parsed content verification, and should not prevent us from parsing the file again. Bug: 319090769 Test: atest VtsHalBluetoothAudioTargetTest Change-Id: Iab6235b5d265bb254ae6075b8c32d0eae0fc1829 --- .../utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp index 99dea84a6c..473777c945 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp @@ -43,9 +43,6 @@ static bool isInvalidFileContent = false; std::optional BluetoothLeAudioCodecsProvider::ParseFromLeAudioOffloadSettingFile() { - if (!leAudioCodecCapabilities.empty() || isInvalidFileContent) { - return std::nullopt; - } auto le_audio_offload_setting = setting::readLeAudioOffloadSetting(kLeAudioCodecCapabilitiesFile); if (!le_audio_offload_setting.has_value()) {