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

Commit 7d5e27af authored by David Duarte's avatar David Duarte
Browse files

MediaPlayerWrapperTest: Remove unused TestLooperManager

This has the side effect of not blocking the Looper thread anymore, but looking at the code it seems to only be used for a timeout

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: TEST_ONLY
Change-Id: I44c3632ce41e2c8e7b7a5fe073611e07926bb71f
parent 784ead99
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -247,7 +247,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testNoQueueMediaUpdates() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -309,7 +308,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testDataOnUpdateNoQueue() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -353,7 +351,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testNullMetadata() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -384,7 +381,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testNullPlayback() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -416,7 +412,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testNullQueue() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -443,7 +438,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testQueueCached() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -497,7 +491,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testPlaybackStateUpdateSpam() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -553,7 +546,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testWrapperCleanup() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -573,7 +565,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testIgnorePlaystateNone() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -603,7 +594,6 @@ public class MediaPlayerWrapperTest {
    @Test
    public void testMetadataSync() {
        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager = new TestLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);
@@ -712,9 +702,6 @@ public class MediaPlayerWrapperTest {
        final int numTestLoops = 100;

        // Create the wrapper object and register the looper with the timeout handler
        TestLooperManager looperManager =
                InstrumentationRegistry.getInstrumentation()
                        .acquireLooperManager(mThread.getLooper());
        MediaPlayerWrapper wrapper =
                MediaPlayerWrapperFactory.wrap(mMockContext, mMockController, mThread.getLooper());
        wrapper.registerCallback(mTestCbs);