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

Commit 00d346c0 authored by William Escande's avatar William Escande
Browse files

A2dpSinkStream: stop calling NativeInterface in test

Bug: 295237486
Test: atest A2dpSinkStreamHandlerTest
Change-Id: If72bbecc0b79d6a69cccee8e4c594943c98b6555
parent ce961774
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -33,9 +33,9 @@ import androidx.test.filters.MediumTest;
import androidx.test.rule.ServiceTestRule;
import androidx.test.runner.AndroidJUnit4;

import com.android.bluetooth.R;
import com.android.bluetooth.TestUtils;
import com.android.bluetooth.avrcpcontroller.AvrcpControllerService;
import com.android.bluetooth.avrcpcontroller.AvrcpControllerNativeInterface;
import com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService;
import com.android.bluetooth.btservice.AdapterService;

@@ -58,6 +58,7 @@ public class A2dpSinkStreamHandlerTest {
    @Mock private A2dpSinkService mMockA2dpSink;

    @Mock private A2dpSinkNativeInterface mMockNativeInterface;
    @Mock private AvrcpControllerNativeInterface mMockAvrcpControllerNativeInterface;

    @Mock private AudioManager mMockAudioManager;

@@ -84,6 +85,7 @@ public class A2dpSinkStreamHandlerTest {
        }
        TestUtils.setAdapterService(mAdapterService);
        doReturn(true, false).when(mAdapterService).isStartedProfile(anyString());
        AvrcpControllerNativeInterface.setInstance(mMockAvrcpControllerNativeInterface);
        TestUtils.startService(mServiceRule, AvrcpControllerService.class);
        final Intent bluetoothBrowserMediaServiceStartIntent =
                TestUtils.prepareIntentToStartBluetoothBrowserMediaService();
@@ -112,6 +114,7 @@ public class A2dpSinkStreamHandlerTest {
    @After
    public void tearDown() throws Exception {
        TestUtils.stopService(mServiceRule, AvrcpControllerService.class);
        AvrcpControllerNativeInterface.setInstance(null);
        TestUtils.clearAdapterService(mAdapterService);
    }