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

Commit ca37e6fe authored by Hall Liu's avatar Hall Liu Committed by Automerger Merge Worker
Browse files

Merge "Inject dependencies into TelephonyRegistry" into rvc-dev am: c2e36eb1 am: 57caa6bd

Change-Id: Ib45a5bb2da77e6f099b194dda50f366b11062e29
parents 7c8cd871 57caa6bd
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import android.content.Intent;
@@ -151,7 +152,12 @@ public class TelephonyRegistryTest extends TelephonyTest {
    @Before
    public void setUp() throws Exception {
        super.setUp("TelephonyRegistryTest");
        mTelephonyRegistry = new TelephonyRegistry(mContext);
        TelephonyRegistry.ConfigurationProvider mockConfigurationProvider =
                mock(TelephonyRegistry.ConfigurationProvider.class);
        when(mockConfigurationProvider.getRegistrationLimit()).thenReturn(-1);
        when(mockConfigurationProvider.isRegistrationLimitEnabledInPlatformCompat(anyInt()))
                .thenReturn(false);
        mTelephonyRegistry = new TelephonyRegistry(mContext, mockConfigurationProvider);
        addTelephonyRegistryService();
        mPhoneStateListener = new PhoneStateListenerWrapper();
        processAllMessages();