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

Commit f9422226 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:...

Merge "Make sure the test looper is prepared in HeadsetPhoneStateTest" am: d4220355 am: 219951b5

Change-Id: Ib8519a6ff8048d047fb2d470126662fa3b74afdd
parents 42acbc68 219951b5
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);