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

Commit f53e47f6 authored by Hui Wang's avatar Hui Wang Committed by Automerger Merge Worker
Browse files

Merge "Reset throttling timer when sim loaded" into sc-dev am: ce516b37

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/15693645

Change-Id: I945e8ef160dade7f8aa8eb1c490fc209f3602ead
parents 1b3b4827 ce516b37
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2547,6 +2547,7 @@ public class DcTracker extends Handler {
        if (mSimState == TelephonyManager.SIM_STATE_ABSENT) {
            onSimAbsent();
        } else if (mSimState == TelephonyManager.SIM_STATE_LOADED) {
            mDataThrottler.reset();
            if (mConfigReady) {
                createAllApnList();
                setDataProfilesAsNeeded();
+14 −1
Original line number Diff line number Diff line
@@ -2907,7 +2907,20 @@ public class DcTrackerTest extends TelephonyTest {
        waitForLastHandlerAction(mDcTrackerTestHandler.getThreadHandler());

        // Verify unthrottling
        verify(mDataThrottler).reset();
        verify(mDataThrottler, times(2)).reset();
    }

    @Test
    public void testDataUnthrottledOnSimStateChanged() throws Exception {
        initApns(ApnSetting.TYPE_IMS_STRING, new String[]{ApnSetting.TYPE_IMS_STRING});
        replaceInstance(DcTracker.class, "mDataThrottler", mDct, mDataThrottler);

        mDct.enableApn(ApnSetting.TYPE_IMS, DcTracker.REQUEST_TYPE_NORMAL, null);
        sendInitializationEvents();
        sendSimStateUpdated("testDataUnthrottledOnSimStateChanged");

        // Verify unthrottling
        verify(mDataThrottler, times(2)).reset();
    }

    @Test