diff options
author | 2025-03-21 09:23:16 -0700 | |
---|---|---|
committer | 2025-03-21 09:23:16 -0700 | |
commit | d88124dd93d4415fdb7289010c887042e5053d6c (patch) | |
tree | 0367dfbbe10d3b4fbd01fc92a1358ad06bfd258c | |
parent | 93a98f2df6b49e9704f9d81f2da6640a900e4c22 (diff) | |
parent | 6870e5c16b24813e6a40078cc60777faed2ebae5 (diff) |
Merge changes I0a52adef,I774c0dfb,Ib0decd98,I43d79ad4 into main
* changes:
flag: Remove leaudio_mono_location_errata flag
flag: Remove leaudio_improve_switch_during_phone_call flag
flag: Remove leaudio_unicast_no_available_contexts flag
flag: Remove le_audio_support_unidirectional_voice_assistant flag
-rw-r--r-- | android/app/src/com/android/bluetooth/le_audio/LeAudioService.java | 5 | ||||
-rw-r--r-- | android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java | 4 | ||||
-rw-r--r-- | flags/leaudio.aconfig | 37 | ||||
-rw-r--r-- | system/bta/le_audio/client.cc | 5 | ||||
-rw-r--r-- | system/bta/le_audio/codec_manager.cc | 7 | ||||
-rw-r--r-- | system/bta/le_audio/codec_manager_test.cc | 4 | ||||
-rw-r--r-- | system/bta/le_audio/device_groups.cc | 24 | ||||
-rw-r--r-- | system/bta/le_audio/le_audio_client_test.cc | 7 |
8 files changed, 14 insertions, 79 deletions
diff --git a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java index 3576d07c3c..54ced65311 100644 --- a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +++ b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java @@ -348,7 +348,7 @@ public class LeAudioService extends ProfileService { mLostLeadDeviceWhileStreaming = null; mCurrentLeadDevice = null; mInbandRingtoneEnabled = isInbandRingtoneEnabled; - mAvailableContexts = Flags.leaudioUnicastNoAvailableContexts() ? null : 0; + mAvailableContexts = null; mInputSelectableConfig = new ArrayList<>(); mOutputSelectableConfig = new ArrayList<>(); mInactivatedDueToContextType = false; @@ -4342,8 +4342,7 @@ public class LeAudioService extends ProfileService { if (getConnectedPeerDevices(groupId).isEmpty()) { descriptor.mIsConnected = false; descriptor.mAutoActiveModeEnabled = true; - descriptor.mAvailableContexts = - Flags.leaudioUnicastNoAvailableContexts() ? null : 0; + descriptor.mAvailableContexts = null; if (descriptor.isActive()) { /* Notify Native layer */ removeActiveDevice(hasFallbackDevice); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java index 5d3634d952..b69b864bb4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java @@ -211,7 +211,6 @@ public class LeAudioServiceTest { public static List<FlagsParameterization> getParams() { return FlagsParameterization.progressionOf( Flags.FLAG_LEAUDIO_BROADCAST_PRIMARY_GROUP_SELECTION, - Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS, Flags.FLAG_LEAUDIO_BROADCAST_API_MANAGE_PRIMARY_GROUP, Flags.FLAG_DO_NOT_HARDCODE_TMAP_ROLE_MASK); } @@ -2836,7 +2835,6 @@ public class LeAudioServiceTest { * </pre> */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateGroupWhenAvailableContextAreBack_Scenario1() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ @@ -2920,7 +2918,6 @@ public class LeAudioServiceTest { * </pre> */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateDeviceWhenAvailableContextAreBack_Scenario2() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ @@ -3018,7 +3015,6 @@ public class LeAudioServiceTest { * 4. The available contexts are updated with non-zero value. Group becomes active. */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateDeviceWhenAvailableContextAreBack_Scenario3() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index bc9210e9b4..7a917fbaca 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -51,16 +51,6 @@ flag { } flag { - name: "leaudio_mono_location_errata" - namespace: "bluetooth" - description: "Add mono location as per Bluetooth Assigned Numbers" - bug: "331139722" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "leaudio_mono_location_errata_api" is_exported: true namespace: "bluetooth" @@ -69,13 +59,6 @@ flag { } flag { - name: "le_audio_support_unidirectional_voice_assistant" - namespace: "bluetooth" - description: "Allow to create unidirectional stream for VOICEASSISTANT" - bug: "332510824" -} - -flag { name: "run_clock_recovery_in_worker_thread" namespace: "bluetooth" description: "Fix thread ownership issue in clock_recovery" @@ -137,26 +120,6 @@ flag { } flag { - name: "leaudio_unicast_no_available_contexts" - namespace: "bluetooth" - description: "Fix handling initial zero available contexts" - bug: "367325041" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { - name: "leaudio_improve_switch_during_phone_call" - namespace: "bluetooth" - description: "Fix audio slip to speaker while switching bt audio device during phonecall" - bug: "369322905" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "leaudio_sort_scans_to_sync_by_fails" namespace: "bluetooth" description: "Sort scan results for source sync by fails counter" diff --git a/system/bta/le_audio/client.cc b/system/bta/le_audio/client.cc index 388070ef8a..ff1b7e2c77 100644 --- a/system/bta/le_audio/client.cc +++ b/system/bta/le_audio/client.cc @@ -1636,11 +1636,6 @@ public: } void PrepareStreamForAConversational(LeAudioDeviceGroup* group) { - if (!com::android::bluetooth::flags::leaudio_improve_switch_during_phone_call()) { - log::info("Flag leaudio_improve_switch_during_phone_call is not enabled"); - return; - } - log::debug("group_id: {}", group->group_id_); auto remote_direction = bluetooth::le_audio::types::kLeAudioDirectionSink; diff --git a/system/bta/le_audio/codec_manager.cc b/system/bta/le_audio/codec_manager.cc index 104d397833..03ea6eede7 100644 --- a/system/bta/le_audio/codec_manager.cc +++ b/system/bta/le_audio/codec_manager.cc @@ -787,11 +787,8 @@ public: bool UpdateCisMonoConfiguration(const std::vector<struct types::cis>& cises, const stream_parameters& stream_params, uint8_t direction) { - if (!LeAudioHalVerifier::SupportsStreamActiveApi() || - !com::android::bluetooth::flags::leaudio_mono_location_errata()) { - log::error( - "SupportsStreamActiveApi() not supported or leaudio_mono_location_errata flag is not " - "enabled. Mono stream cannot be enabled"); + if (!LeAudioHalVerifier::SupportsStreamActiveApi()) { + log::error("SupportsStreamActiveApi() not supported. Mono stream cannot be enabled"); return false; } diff --git a/system/bta/le_audio/codec_manager_test.cc b/system/bta/le_audio/codec_manager_test.cc index c69464b72e..f238b959f8 100644 --- a/system/bta/le_audio/codec_manager_test.cc +++ b/system/bta/le_audio/codec_manager_test.cc @@ -369,8 +369,6 @@ public: // Disable codec extensibility by default osi_property_set_bool(kPropLeAudioCodecExtensibility, false); - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(false); - CodecManagerTestBase::SetUp(); } }; @@ -542,7 +540,6 @@ TEST_F(CodecManagerTestAdsp, testStreamConfigurationAdspDownMix) { } TEST_F(CodecManagerTestAdsp, testStreamConfigurationMono) { - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(true); const std::vector<bluetooth::le_audio::btle_audio_codec_config_t> offloading_preference(0); codec_manager->Start(offloading_preference); @@ -1343,7 +1340,6 @@ TEST_F(CodecManagerTestHost, test_dont_call_hal_for_config) { } TEST_F(CodecManagerTestAdsp, testStreamConfigurationVendor) { - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(true); osi_property_set_bool(kPropLeAudioCodecExtensibility, true); const std::vector<bluetooth::le_audio::btle_audio_codec_config_t> offloading_preference(0); diff --git a/system/bta/le_audio/device_groups.cc b/system/bta/le_audio/device_groups.cc index 43f27c0a31..6b1f98a6f8 100644 --- a/system/bta/le_audio/device_groups.cc +++ b/system/bta/le_audio/device_groups.cc @@ -862,8 +862,7 @@ LeAudioDeviceGroup::GetAudioSetConfigurationRequirements(types::LeAudioContextTy continue; } - if ((com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant() && - ctx_type == types::LeAudioContextType::VOICEASSISTANTS) || + if (ctx_type == types::LeAudioContextType::VOICEASSISTANTS || ctx_type == types::LeAudioContextType::GAME) { // For GAME and VOICE ASSISTANT, ignore direction if it is not supported only on a single // direction. @@ -1689,19 +1688,16 @@ bool LeAudioDeviceGroup::IsAudioSetConfigurationSupported( continue; } - if (com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant()) { - // Verify the direction requirements. - if (direction == types::kLeAudioDirectionSink && - requirements.sink_requirements->size() == 0) { - log::debug("There is no requirement for Sink direction."); - return false; - } + // Verify the direction requirements. + if (direction == types::kLeAudioDirectionSink && requirements.sink_requirements->size() == 0) { + log::debug("There is no requirement for Sink direction."); + return false; + } - if (direction == types::kLeAudioDirectionSource && - requirements.source_requirements->size() == 0) { - log::debug("There is no requirement for source direction."); - return false; - } + if (direction == types::kLeAudioDirectionSource && + requirements.source_requirements->size() == 0) { + log::debug("There is no requirement for source direction."); + return false; } // Match with requirement first if we have diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index a27c272872..69cd0fe768 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -5022,7 +5022,6 @@ TEST_F(UnicastTest, GroupSetActive_and_InactiveDuringStreamConfiguration) { } TEST_F(UnicastTest, AnotherGroupSetActive_DuringMediaStream) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); const RawAddress test_address1 = GetTestAddress(1); int group_id_1 = 1; @@ -5101,7 +5100,6 @@ TEST_F(UnicastTest, AnotherGroupSetActive_DuringMediaStream) { } TEST_F(UnicastTest, AnotherGroupSetActive_DuringVoip) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); const RawAddress test_address1 = GetTestAddress(1); int group_id_1 = 1; @@ -5174,7 +5172,6 @@ TEST_F(UnicastTest, AnotherGroupSetActive_DuringVoip) { } TEST_F(UnicastTest, GroupSetActive_and_GroupSetInactive_DuringPhoneCall) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -5221,7 +5218,6 @@ TEST_F(UnicastTest, GroupSetActive_and_GroupSetInactive_DuringPhoneCall) { } TEST_F(UnicastTest, GroupSetActive_DuringPhoneCall_ThenResume) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -6577,7 +6573,6 @@ TEST_F(UnicastTest, SpeakerStreamingNonDefault) { } TEST_F(UnicastTest, TestUnidirectionalGameAndLiveRecording) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -6768,7 +6763,6 @@ TEST_F(UnicastTest, TestUnidirectionalGameAndLiveRecordingMicOnlyDev) { } TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Sink) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -6842,7 +6836,6 @@ TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Sink) { } TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Source) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; |