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

Commit b5d7fe08 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "Add Loopers to tests that require them for message handlers" am:...

Merge "Add Loopers to tests that require them for message handlers" am: 6cabca15 am: 7ca01b2f am: 484648cb
am: 6d925dd2

Change-Id: If5f6e7fdd2b1525b31c29f0afeb36c294cc3c090
parents 6dd38fa8 6d925dd2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ import android.media.MediaMetadata;
import android.media.AudioManager;
import android.media.session.MediaSessionManager;
import android.os.Bundle;
import android.os.Looper;
import android.test.AndroidTestCase;
import android.util.Log;

@@ -29,10 +30,14 @@ import static org.mockito.Mockito.when;
public class AvrcpTest extends AndroidTestCase {

    public void testCanStart() {
        if (Looper.myLooper() == null) Looper.prepare();

        Avrcp a = Avrcp.make(getContext());
    }

    public void testFailedBrowseStart() {
        if (Looper.myLooper() == null) Looper.prepare();

        Context mockContext = mock(Context.class);
        AudioManager mockAudioManager = mock(AudioManager.class);
        PackageManager mockPackageManager = mock(PackageManager.class);