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

Commit 57caa6bd 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

Change-Id: I3348b52768a08d9919b8a75d80a9957d4052add4
parents c7fb1901 c2e36eb1
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();