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

Commit e6ffd60c authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

Remove leaudio_unicast_inactivate_device_based_on_context flag

Bug: 313054788
Bug: 295546903
Test: atest LeAudioServiceTest
Flag: com.android.bluetooth.flags.leaudio_unicast_inactivate_device_based_on_context
Change-Id: I887f7b5656887d5c232593f85275e383c62f2535
parent 424cbfd1
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -2570,20 +2570,14 @@ public class LeAudioService extends ProfileService {
                                1);
                break;
            case LeAudioStackEvent.HEALTH_RECOMMENDATION_ACTION_INACTIVATE_GROUP:
                if (Flags.leaudioUnicastInactivateDeviceBasedOnContext()) {
                LeAudioGroupDescriptor groupDescriptor = getGroupDescriptor(groupId);
                if (groupDescriptor != null
                        && groupDescriptor.isActive()
                        && !isGroupReceivingBroadcast(groupId)) {
                        Log.i(
                                TAG,
                                "Group "
                                        + groupId
                                        + " is inactivated due to blocked media context");
                    Log.i(TAG, "Group " + groupId + " is inactivated due to blocked media context");
                    groupDescriptor.mInactivatedDueToContextType = true;
                    setActiveGroupWithDevice(null, false);
                }
                }
            default:
                break;
        }
+0 −2
Original line number Diff line number Diff line
@@ -1942,7 +1942,6 @@ public class LeAudioServiceTest {

    @Test
    public void testMediaContextUnavailableForAWhile() {
        mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_UNICAST_INACTIVATE_DEVICE_BASED_ON_CONTEXT);
        mSetFlagsRule.enableFlags(Flags.FLAG_AUDIO_ROUTING_CENTRALIZATION);

        doReturn(true).when(mNativeInterface).connectLeAudio(any(BluetoothDevice.class));
@@ -1978,7 +1977,6 @@ public class LeAudioServiceTest {

    @Test
    public void testMediaContextUnavailableWhileReceivingBroadcast() {
        mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_UNICAST_INACTIVATE_DEVICE_BASED_ON_CONTEXT);
        mSetFlagsRule.enableFlags(Flags.FLAG_AUDIO_ROUTING_CENTRALIZATION);
        mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_BROADCAST_AUDIO_HANDOVER_POLICIES);

+0 −7
Original line number Diff line number Diff line
@@ -24,13 +24,6 @@ flag {
    bug: "308171251"
}

flag {
    name: "leaudio_unicast_inactivate_device_based_on_context"
    namespace: "bluetooth"
    description: "Inactivate audio device when stream cannot be created due to unavailable context type"
    bug: "313054788"
}

flag {
    name: "leaudio_multicodec_aidl_support"
    namespace: "bluetooth"