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

Commit 7e7edeb2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make sure the test looper is prepared in HeadsetPhoneStateTest" am: 308912c5

Change-Id: I4dca26ab9a94083bb965c5ebaee5812c952cca64
parents 91e4bfc2 308912c5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.ServiceManager;
import android.telephony.PhoneStateListener;
import android.telephony.SubscriptionManager;
@@ -62,6 +63,9 @@ public class HeadsetPhoneStateTest {

    @Before
    public void setUp() throws Exception {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }
        MockitoAnnotations.initMocks(this);
        // Mock SubscriptionManager.getDefaultSubscriptionId() to return a valid value
        when(mISub.getDefaultSubId()).thenReturn(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);