Loading src/java/com/android/internal/telephony/data/DataConfigManager.java +6 −17 Original line number Diff line number Diff line Loading @@ -301,8 +301,6 @@ public class DataConfigManager extends Handler { private @NonNull final List<HandoverRule> mHandoverRuleList = new ArrayList<>(); /** {@code True} keep IMS network in case of moving to non VOPS area; {@code false} otherwise.*/ private boolean mShouldKeepNetworkUpInNonVops = false; /** {@code True} requires ping test before switching preferred modem; {@code false} otherwise.*/ private boolean mPingTestBeforeDataSwitch = true; /** * Constructor Loading Loading @@ -450,7 +448,6 @@ public class DataConfigManager extends Handler { updateMeteredApnTypes(); updateSingleDataNetworkTypeAndCapabilityExemption(); updateVopsConfig(); updateDataSwitchConfig(); updateUnmeteredNetworkTypes(); updateBandwidths(); updateTcpBuffers(); Loading Loading @@ -671,16 +668,6 @@ public class DataConfigManager extends Handler { } } /** * Update preferred modem switch(opportunistic network or visible subscription) carrier config. */ private void updateDataSwitchConfig() { synchronized (this) { mPingTestBeforeDataSwitch = mCarrierConfig.getBoolean(CarrierConfigManager .KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL, true); } } /** * @return The list of {@link NetworkType} that only supports single data networks */ Loading @@ -701,9 +688,10 @@ public class DataConfigManager extends Handler { return mShouldKeepNetworkUpInNonVops; } /** {@code True} keep IMS network in case of moving to non VOPS area; {@code false} otherwise.*/ public boolean requirePingTestBeforeDataSwitch() { return mPingTestBeforeDataSwitch; /** {@code True} requires ping test to pass on the target slot before switching to it.*/ public boolean isPingTestBeforeAutoDataSwitchRequired() { return mResources.getBoolean(com.android.internal.R.bool .auto_data_switch_ping_test_before_switch); } /** Loading Loading @@ -1340,7 +1328,8 @@ public class DataConfigManager extends Handler { .stream().map(DataUtils::networkCapabilityToString) .collect(Collectors.joining(","))); pw.println("mShouldKeepNetworkUpInNoVops=" + mShouldKeepNetworkUpInNonVops); pw.println("mPingTestBeforeDataSwitch=" + mPingTestBeforeDataSwitch); pw.println("isPingTestBeforeAutoDataSwitchRequired=" + isPingTestBeforeAutoDataSwitchRequired()); pw.println("Unmetered network types=" + String.join(",", mUnmeteredNetworkTypes)); pw.println("Roaming unmetered network types=" + String.join(",", mRoamingUnmeteredNetworkTypes)); Loading src/java/com/android/internal/telephony/data/PhoneSwitcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -953,7 +953,7 @@ public class PhoneSwitcher extends Handler { Phone phone = getPhoneBySubId(mPrimaryDataSubId); if (phone != null) { DataConfigManager dataConfig = phone.getDataNetworkController().getDataConfigManager(); mRequirePingTestBeforeDataSwitch = dataConfig.requirePingTestBeforeDataSwitch(); mRequirePingTestBeforeDataSwitch = dataConfig.isPingTestBeforeAutoDataSwitchRequired(); mAutoDataSwitchAvailabilityStabilityTimeThreshold = dataConfig.getAutoDataSwitchAvailabilityStabilityTimeThreshold(); mAutoDataSwitchValidationMaxRetry = Loading tests/telephonytests/src/com/android/internal/telephony/data/PhoneSwitcherTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -647,7 +647,7 @@ public class PhoneSwitcherTest extends TelephonyTest { setSlotIndexToSubId(1, 2); setDefaultDataSubId(1); doReturn(false).when(mDataConfigManager).requirePingTestBeforeDataSwitch(); doReturn(false).when(mDataConfigManager).isPingTestBeforeAutoDataSwitchRequired(); mDataConfigManagerCallback.onCarrierConfigChanged(); //1. Attempting to switch to nDDS, switch even if validation failed Loading Loading @@ -2047,7 +2047,7 @@ public class PhoneSwitcherTest extends TelephonyTest { doReturn(1000L).when(mDataConfigManager) .getAutoDataSwitchAvailabilityStabilityTimeThreshold(); doReturn(7).when(mDataConfigManager).getAutoDataSwitchValidationMaxRetry(); doReturn(true).when(mDataConfigManager).requirePingTestBeforeDataSwitch(); doReturn(true).when(mDataConfigManager).isPingTestBeforeAutoDataSwitchRequired(); mDataConfigManagerCallback.onCarrierConfigChanged(); mDataConfigManagerCallback.onDeviceConfigChanged(); Loading Loading
src/java/com/android/internal/telephony/data/DataConfigManager.java +6 −17 Original line number Diff line number Diff line Loading @@ -301,8 +301,6 @@ public class DataConfigManager extends Handler { private @NonNull final List<HandoverRule> mHandoverRuleList = new ArrayList<>(); /** {@code True} keep IMS network in case of moving to non VOPS area; {@code false} otherwise.*/ private boolean mShouldKeepNetworkUpInNonVops = false; /** {@code True} requires ping test before switching preferred modem; {@code false} otherwise.*/ private boolean mPingTestBeforeDataSwitch = true; /** * Constructor Loading Loading @@ -450,7 +448,6 @@ public class DataConfigManager extends Handler { updateMeteredApnTypes(); updateSingleDataNetworkTypeAndCapabilityExemption(); updateVopsConfig(); updateDataSwitchConfig(); updateUnmeteredNetworkTypes(); updateBandwidths(); updateTcpBuffers(); Loading Loading @@ -671,16 +668,6 @@ public class DataConfigManager extends Handler { } } /** * Update preferred modem switch(opportunistic network or visible subscription) carrier config. */ private void updateDataSwitchConfig() { synchronized (this) { mPingTestBeforeDataSwitch = mCarrierConfig.getBoolean(CarrierConfigManager .KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL, true); } } /** * @return The list of {@link NetworkType} that only supports single data networks */ Loading @@ -701,9 +688,10 @@ public class DataConfigManager extends Handler { return mShouldKeepNetworkUpInNonVops; } /** {@code True} keep IMS network in case of moving to non VOPS area; {@code false} otherwise.*/ public boolean requirePingTestBeforeDataSwitch() { return mPingTestBeforeDataSwitch; /** {@code True} requires ping test to pass on the target slot before switching to it.*/ public boolean isPingTestBeforeAutoDataSwitchRequired() { return mResources.getBoolean(com.android.internal.R.bool .auto_data_switch_ping_test_before_switch); } /** Loading Loading @@ -1340,7 +1328,8 @@ public class DataConfigManager extends Handler { .stream().map(DataUtils::networkCapabilityToString) .collect(Collectors.joining(","))); pw.println("mShouldKeepNetworkUpInNoVops=" + mShouldKeepNetworkUpInNonVops); pw.println("mPingTestBeforeDataSwitch=" + mPingTestBeforeDataSwitch); pw.println("isPingTestBeforeAutoDataSwitchRequired=" + isPingTestBeforeAutoDataSwitchRequired()); pw.println("Unmetered network types=" + String.join(",", mUnmeteredNetworkTypes)); pw.println("Roaming unmetered network types=" + String.join(",", mRoamingUnmeteredNetworkTypes)); Loading
src/java/com/android/internal/telephony/data/PhoneSwitcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -953,7 +953,7 @@ public class PhoneSwitcher extends Handler { Phone phone = getPhoneBySubId(mPrimaryDataSubId); if (phone != null) { DataConfigManager dataConfig = phone.getDataNetworkController().getDataConfigManager(); mRequirePingTestBeforeDataSwitch = dataConfig.requirePingTestBeforeDataSwitch(); mRequirePingTestBeforeDataSwitch = dataConfig.isPingTestBeforeAutoDataSwitchRequired(); mAutoDataSwitchAvailabilityStabilityTimeThreshold = dataConfig.getAutoDataSwitchAvailabilityStabilityTimeThreshold(); mAutoDataSwitchValidationMaxRetry = Loading
tests/telephonytests/src/com/android/internal/telephony/data/PhoneSwitcherTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -647,7 +647,7 @@ public class PhoneSwitcherTest extends TelephonyTest { setSlotIndexToSubId(1, 2); setDefaultDataSubId(1); doReturn(false).when(mDataConfigManager).requirePingTestBeforeDataSwitch(); doReturn(false).when(mDataConfigManager).isPingTestBeforeAutoDataSwitchRequired(); mDataConfigManagerCallback.onCarrierConfigChanged(); //1. Attempting to switch to nDDS, switch even if validation failed Loading Loading @@ -2047,7 +2047,7 @@ public class PhoneSwitcherTest extends TelephonyTest { doReturn(1000L).when(mDataConfigManager) .getAutoDataSwitchAvailabilityStabilityTimeThreshold(); doReturn(7).when(mDataConfigManager).getAutoDataSwitchValidationMaxRetry(); doReturn(true).when(mDataConfigManager).requirePingTestBeforeDataSwitch(); doReturn(true).when(mDataConfigManager).isPingTestBeforeAutoDataSwitchRequired(); mDataConfigManagerCallback.onCarrierConfigChanged(); mDataConfigManagerCallback.onDeviceConfigChanged(); Loading