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

Commit f5d33a6c authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge "Inject dependencies into TelephonyRegistry"

parents 4eb2cc5b 0354e7d1
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;
@@ -148,7 +149,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();