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

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

Remove keep_hfp_active_during_leaudio_handover flag

As the flag is already in nextfood, and release to public, remove the flag

Bug: 339528451
Change-Id: I42d54c7fd16b6b4c571c84ea1a9a280bba0ff150
Test: atest HeadsetServiceAndStateMachineTest
parent 2b455a56
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -2359,26 +2359,17 @@ public class HeadsetService extends ProfileService {
                // co-existence see {@link LeAudioService#setInactiveForHfpHandover}
                if (Flags.leaudioResumeActiveAfterHfpHandover()) {
                    LeAudioService leAudioService = mFactory.getLeAudioService();
                    if (!Flags.keepHfpActiveDuringLeaudioHandover()
                            && leAudioService != null
                    boolean isLeAudioConnectedDeviceNotActive = leAudioService != null
                            && !leAudioService.getConnectedDevices().isEmpty()
                            && leAudioService.getActiveDevices().get(0) == null) {
                        leAudioService.setActiveAfterHfpHandover();
                    }

                            && leAudioService.getActiveDevices().get(0) == null;
                    // usually controller limitation cause CONNECTING -> DISCONNECTED, so only
                    // resume LE audio active device if it is HFP audio only and SCO disconnected
                    if (Flags.keepHfpActiveDuringLeaudioHandover()
                            && fromState != BluetoothHeadset.STATE_AUDIO_CONNECTING
                            && isHFPAudioOnly(device)) {

                        if (leAudioService != null
                                && !leAudioService.getConnectedDevices().isEmpty()
                                && leAudioService.getActiveDevices().get(0) == null) {
                    if (fromState != BluetoothHeadset.STATE_AUDIO_CONNECTING
                            && isHFPAudioOnly(device)
                            && isLeAudioConnectedDeviceNotActive) {
                        leAudioService.setActiveAfterHfpHandover();
                    }
                }
                }

                // Unsuspend A2DP when SCO connection is gone and call state is idle
                if (mSystemInterface.isCallIdle() && !Utils.isScoManagedByAudioEnabled()) {
+0 −1
Original line number Diff line number Diff line
@@ -1559,7 +1559,6 @@ public class HeadsetServiceAndStateMachineTest {
    public void testHfpOnlyHandoverToLeAudioAfterScoDisconnect() {
        BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0);
        mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_RESUME_ACTIVE_AFTER_HFP_HANDOVER);
        mSetFlagsRule.enableFlags(Flags.FLAG_KEEP_HFP_ACTIVE_DURING_LEAUDIO_HANDOVER);

        assertThat(mHeadsetService.mFactory).isNotNull();
        mHeadsetService.mFactory = mServiceFactory;
+0 −10
Original line number Diff line number Diff line
@@ -66,16 +66,6 @@ flag {
    }
}

flag {
    name: "keep_hfp_active_during_leaudio_handover"
    namespace: "bluetooth"
    description: "During LE audio to HFP handover, keep HFP active throughout SCO retry"
    bug: "339528451"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "fix_hfp_qual_1_9"
    namespace: "bluetooth"