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

Commit e5019b79 authored by William Escande's avatar William Escande
Browse files

Trunk Stable/MediaControl: do not skip test

Bug: 324658330
Bug: 316005152
Test: m Bluetooth | mechanical refactor
Change-Id: I00bafdf5e11bd3867e577063a481666da16b22f3
parent 12fd230f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothLeBroadcastMetadata;
import android.content.Context;
import android.os.Looper;
import android.platform.test.annotations.RequiresFlagsEnabled;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
@@ -38,10 +37,12 @@ import com.android.bluetooth.TestUtils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.flags.Flags;
import com.android.bluetooth.le_audio.LeAudioService;
import android.platform.test.flag.junit.SetFlagsRule;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -68,6 +69,8 @@ public class MediaControlGattServiceTest {
    private static final UUID UUID_CCCD = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
    public static final int TEST_CCID = 1;

    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();

    private MediaControlGattService mMcpService;

    @Mock private AdapterService mAdapterService;
@@ -942,8 +945,8 @@ public class MediaControlGattServiceTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_LEAUDIO_BROADCAST_FEATURE_SUPPORT)
    public void testMediaControlPointeRequest_OpcodePlayCallLeAudioServiceSetActiveDevice() {
        mSetFlagsRule.enableFlags(Flags.FLAG_LEAUDIO_BROADCAST_FEATURE_SUPPORT);
        BluetoothGattService service = initAllFeaturesGattService();
        prepareConnectedDevice();
        mMcpService.updateSupportedOpcodesChar(Request.SupportedOpcodes.PLAY, true);