Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -2316,6 +2316,7 @@ public class DcTracker extends Handler { // TODO: It'd be nice to only do this if the changed entrie(s) // match the current operator. if (DBG) log("onApnChanged: createAllApnList and cleanUpAllConnections"); mDataThrottler.reset(); setDefaultPreferredApnIfNeeded(); createAllApnList(); setDataProfilesAsNeeded(); Loading tests/telephonytests/src/com/android/internal/telephony/dataconnection/DcTrackerTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -2896,6 +2896,20 @@ public class DcTrackerTest extends TelephonyTest { eq(DcTracker.REQUEST_TYPE_NORMAL)); } @Test public void testDataUnthrottledAfterAPNChanged() 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(); mDct.sendMessage(mDct.obtainMessage(DctConstants.EVENT_APN_CHANGED, null)); waitForLastHandlerAction(mDcTrackerTestHandler.getThreadHandler()); // Verify unthrottling verify(mDataThrottler).reset(); } @Test public void testHandlingSecondHandoverRequest() throws Exception { initApns(ApnSetting.TYPE_IMS_STRING, new String[]{ApnSetting.TYPE_IMS_STRING}); Loading Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -2316,6 +2316,7 @@ public class DcTracker extends Handler { // TODO: It'd be nice to only do this if the changed entrie(s) // match the current operator. if (DBG) log("onApnChanged: createAllApnList and cleanUpAllConnections"); mDataThrottler.reset(); setDefaultPreferredApnIfNeeded(); createAllApnList(); setDataProfilesAsNeeded(); Loading
tests/telephonytests/src/com/android/internal/telephony/dataconnection/DcTrackerTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -2896,6 +2896,20 @@ public class DcTrackerTest extends TelephonyTest { eq(DcTracker.REQUEST_TYPE_NORMAL)); } @Test public void testDataUnthrottledAfterAPNChanged() 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(); mDct.sendMessage(mDct.obtainMessage(DctConstants.EVENT_APN_CHANGED, null)); waitForLastHandlerAction(mDcTrackerTestHandler.getThreadHandler()); // Verify unthrottling verify(mDataThrottler).reset(); } @Test public void testHandlingSecondHandoverRequest() throws Exception { initApns(ApnSetting.TYPE_IMS_STRING, new String[]{ApnSetting.TYPE_IMS_STRING}); Loading