Loading flags/network.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -65,14 +65,6 @@ flag { bug: "310639009" } # OWNER=sarahchin TARGET=24Q2 flag { name: "support_nr_sa_rrc_idle" namespace: "telephony" description: "Support RRC idle for NR SA." bug: "298233308" } # OWNER=nharold TARGET=24Q3 flag { name: "network_registration_info_reject_cause" Loading src/java/com/android/internal/telephony/NetworkTypeController.java +17 −41 Original line number Diff line number Diff line Loading @@ -509,9 +509,6 @@ public class NetworkTypeController extends StateMachine { if (DBG) loge("Invalid 5G icon configuration, config = " + pair); continue; } if (!mFeatureFlags.supportNrSaRrcIdle() && kv[0].equals(STATE_CONNECTED_RRC_IDLE)) { continue; } int icon = TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE; if (kv[1].equals(ICON_5G)) { icon = TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA; Loading Loading @@ -539,9 +536,6 @@ public class NetworkTypeController extends StateMachine { if (DBG) loge("Invalid 5G icon timer configuration, config = " + triple); continue; } if (!mFeatureFlags.supportNrSaRrcIdle() && kv[0].equals(STATE_CONNECTED_RRC_IDLE)) { continue; } int duration; try { duration = Integer.parseInt(kv[2]); Loading @@ -550,10 +544,6 @@ public class NetworkTypeController extends StateMachine { } if (kv[0].equals(STATE_ANY)) { for (String state : ALL_STATES) { if (!mFeatureFlags.supportNrSaRrcIdle() && state.equals(STATE_CONNECTED_RRC_IDLE)) { continue; } OverrideTimerRule node = tempRules.get(state); node.addTimer(kv[1], duration); } Loading @@ -574,9 +564,6 @@ public class NetworkTypeController extends StateMachine { } continue; } if (kv[0].equals(STATE_CONNECTED_RRC_IDLE) && !mFeatureFlags.supportNrSaRrcIdle()) { continue; } int duration; try { duration = Integer.parseInt(kv[2]); Loading @@ -585,10 +572,6 @@ public class NetworkTypeController extends StateMachine { } if (kv[0].equals(STATE_ANY)) { for (String state : ALL_STATES) { if (state.equals(STATE_CONNECTED_RRC_IDLE) && !mFeatureFlags.supportNrSaRrcIdle()) { continue; } OverrideTimerRule node = tempRules.get(state); node.addSecondaryTimer(kv[1], duration); } Loading @@ -601,7 +584,6 @@ public class NetworkTypeController extends StateMachine { // TODO: Remove this workaround to make STATE_CONNECTED_RRC_IDLE backwards compatible with // STATE_CONNECTED once carrier configs are updated. if (mFeatureFlags.supportNrSaRrcIdle()) { OverrideTimerRule nrRules = tempRules.get(STATE_CONNECTED); if (!tempRules.get(STATE_CONNECTED_RRC_IDLE).isDefined() && nrRules.isDefined()) { OverrideTimerRule nrIdleRules = Loading @@ -614,7 +596,6 @@ public class NetworkTypeController extends StateMachine { } tempRules.put(STATE_CONNECTED_RRC_IDLE, nrIdleRules); } } mOverrideTimerRules = tempRules; if (DBG) log("mOverrideTimerRules: " + mOverrideTimerRules); Loading Loading @@ -888,7 +869,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (isLte(rat) && isNrNotRestricted()) { Loading Loading @@ -971,7 +951,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (!isLte(rat) || !isNrNotRestricted()) { Loading Loading @@ -1055,7 +1034,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (!isLte(rat) || !isNrNotRestricted()) { Loading Loading @@ -1187,7 +1165,7 @@ public class NetworkTypeController extends StateMachine { @Override public String getName() { return mFeatureFlags.supportNrSaRrcIdle() ? STATE_CONNECTED_RRC_IDLE : STATE_CONNECTED; return STATE_CONNECTED_RRC_IDLE; } } Loading Loading @@ -1222,7 +1200,7 @@ public class NetworkTypeController extends StateMachine { || (isLte(rat) && isNrConnected())) { if (isNrAdvanced()) { transitionTo(mNrConnectedAdvancedState); } else if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { } else if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else { // Update in case the override network type changed Loading @@ -1241,7 +1219,7 @@ public class NetworkTypeController extends StateMachine { if (isUsingPhysicalChannelConfigForRrcDetection()) { mPhysicalLinkStatus = getPhysicalLinkStatusFromPhysicalChannelConfig(); } if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else if (isNrAdvanced()) { transitionTo(mNrConnectedAdvancedState); Loading @@ -1249,7 +1227,7 @@ public class NetworkTypeController extends StateMachine { break; case EVENT_PHYSICAL_LINK_STATUS_CHANGED: mPhysicalLinkStatus = msg.arg1; if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } break; Loading Loading @@ -1314,7 +1292,6 @@ public class NetworkTypeController extends StateMachine { TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE; } transitionWithTimerTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (isLte(rat) && isNrNotRestricted()) { Loading @@ -1330,7 +1307,7 @@ public class NetworkTypeController extends StateMachine { if (isUsingPhysicalChannelConfigForRrcDetection()) { mPhysicalLinkStatus = getPhysicalLinkStatusFromPhysicalChannelConfig(); } if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else if (!isNrAdvanced()) { transitionWithTimerTo(mNrConnectedState); Loading Loading @@ -1425,7 +1402,7 @@ public class NetworkTypeController extends StateMachine { mRatchetedNrBandwidths = Math.max(mRatchetedNrBandwidths, nrBandwidths); mRatchetedNrBands.addAll(nrBands); } else { if (mFeatureFlags.supportNrSaRrcIdle() && mDoesPccListIndicateIdle if (mDoesPccListIndicateIdle && anchorNrCellId != mLastAnchorNrCellId && isUsingPhysicalChannelConfigForRrcDetection() && !mPrimaryCellChangedWhileIdle Loading Loading @@ -1534,7 +1511,7 @@ public class NetworkTypeController extends StateMachine { int dataRat = getDataNetworkType(); IState transitionState; if (dataRat == TelephonyManager.NETWORK_TYPE_NR || (isLte(dataRat) && isNrConnected())) { if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionState = mNrIdleState; } else if (isNrAdvanced()) { transitionState = mNrConnectedAdvancedState; Loading Loading @@ -1842,7 +1819,6 @@ public class NetworkTypeController extends StateMachine { pw.flush(); pw.increaseIndent(); pw.println("mSubId=" + mPhone.getSubId()); pw.println("supportNrSaRrcIdle=" + mFeatureFlags.supportNrSaRrcIdle()); pw.println("mOverrideTimerRules=" + mOverrideTimerRules.toString()); pw.println("mLteEnhancedPattern=" + mLteEnhancedPattern); pw.println("mIsPhysicalChannelConfigOn=" + mIsPhysicalChannelConfigOn); Loading tests/telephonytests/src/com/android/internal/telephony/NetworkTypeControllerTest.java +11 −10 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { // Capture listener to emulate the carrier config change notification used later ArgumentCaptor<CarrierConfigManager.CarrierConfigChangeListener> listenerArgumentCaptor = ArgumentCaptor.forClass(CarrierConfigManager.CarrierConfigChangeListener.class); setPhysicalLinkStatus(true); mNetworkTypeController = new NetworkTypeController(mPhone, mDisplayInfoController, mFeatureFlags); processAllMessages(); Loading Loading @@ -374,7 +375,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testTransitionToCurrentStateNrConnectedIdle() throws Exception { assertEquals("DefaultState", getCurrentState().getName()); doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(new ArrayList<>()).when(mSST).getPhysicalChannelConfigList(); sendCarrierConfigChanged(); Loading Loading @@ -640,7 +640,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { mNetworkTypeController.sendMessage(11 /* EVENT_PHYSICAL_CHANNEL_CONFIGS_CHANGED */, new AsyncResult(null, new ArrayList<>(), null)); processAllMessages(); assertEquals("connected_mmwave", getCurrentState().getName()); assertEquals("connected_rrc_idle", getCurrentState().getName()); // bands and bandwidths should stay ratcheted as long as anchor NR cell is the same physicalChannelConfigs.remove(pcc2); Loading Loading @@ -704,7 +704,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { mNetworkTypeController.sendMessage(11 /* EVENT_PHYSICAL_CHANNEL_CONFIGS_CHANGED */, new AsyncResult(null, new ArrayList<>(), null)); processAllMessages(); assertEquals("connected_mmwave", getCurrentState().getName()); assertEquals("connected_rrc_idle", getCurrentState().getName()); // bands and bandwidths should change if PCC list changes physicalChannelConfigs.remove(pcc2); Loading Loading @@ -809,7 +809,14 @@ public class NetworkTypeControllerTest extends TelephonyTest { new NetworkTypeController(mPhone, mDisplayInfoController, mFeatureFlags); sendCarrierConfigChanged(); processAllMessages(); testTransitionToCurrentStateNrConnectedMmwave(); // service state of NrConnectedMmwave shouldn't affect the result doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(mServiceState).getNrFrequencyRange(); mNetworkTypeController.sendMessage(3 /* EVENT_SERVICE_STATE_CHANGED */); processAllMessages(); doReturn(NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED).when(mServiceState).getNrState(); mNetworkTypeController.sendMessage(4 /* EVENT_PHYSICAL_LINK_STATUS_CHANGED */, DataCallResponse.LINK_STATUS_ACTIVE); Loading Loading @@ -1252,7 +1259,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testPrimaryTimerPrimaryCellChangeNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1509,7 +1515,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testTransitionToNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(mServiceState).getNrFrequencyRange(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); Loading Loading @@ -1555,7 +1560,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerAdvanceBand() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(mServiceState).getNrFrequencyRange(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); Loading Loading @@ -1677,7 +1681,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerExpireNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1748,7 +1751,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerResetNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1830,7 +1832,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerPrimaryCellChangeNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading
flags/network.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -65,14 +65,6 @@ flag { bug: "310639009" } # OWNER=sarahchin TARGET=24Q2 flag { name: "support_nr_sa_rrc_idle" namespace: "telephony" description: "Support RRC idle for NR SA." bug: "298233308" } # OWNER=nharold TARGET=24Q3 flag { name: "network_registration_info_reject_cause" Loading
src/java/com/android/internal/telephony/NetworkTypeController.java +17 −41 Original line number Diff line number Diff line Loading @@ -509,9 +509,6 @@ public class NetworkTypeController extends StateMachine { if (DBG) loge("Invalid 5G icon configuration, config = " + pair); continue; } if (!mFeatureFlags.supportNrSaRrcIdle() && kv[0].equals(STATE_CONNECTED_RRC_IDLE)) { continue; } int icon = TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE; if (kv[1].equals(ICON_5G)) { icon = TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA; Loading Loading @@ -539,9 +536,6 @@ public class NetworkTypeController extends StateMachine { if (DBG) loge("Invalid 5G icon timer configuration, config = " + triple); continue; } if (!mFeatureFlags.supportNrSaRrcIdle() && kv[0].equals(STATE_CONNECTED_RRC_IDLE)) { continue; } int duration; try { duration = Integer.parseInt(kv[2]); Loading @@ -550,10 +544,6 @@ public class NetworkTypeController extends StateMachine { } if (kv[0].equals(STATE_ANY)) { for (String state : ALL_STATES) { if (!mFeatureFlags.supportNrSaRrcIdle() && state.equals(STATE_CONNECTED_RRC_IDLE)) { continue; } OverrideTimerRule node = tempRules.get(state); node.addTimer(kv[1], duration); } Loading @@ -574,9 +564,6 @@ public class NetworkTypeController extends StateMachine { } continue; } if (kv[0].equals(STATE_CONNECTED_RRC_IDLE) && !mFeatureFlags.supportNrSaRrcIdle()) { continue; } int duration; try { duration = Integer.parseInt(kv[2]); Loading @@ -585,10 +572,6 @@ public class NetworkTypeController extends StateMachine { } if (kv[0].equals(STATE_ANY)) { for (String state : ALL_STATES) { if (state.equals(STATE_CONNECTED_RRC_IDLE) && !mFeatureFlags.supportNrSaRrcIdle()) { continue; } OverrideTimerRule node = tempRules.get(state); node.addSecondaryTimer(kv[1], duration); } Loading @@ -601,7 +584,6 @@ public class NetworkTypeController extends StateMachine { // TODO: Remove this workaround to make STATE_CONNECTED_RRC_IDLE backwards compatible with // STATE_CONNECTED once carrier configs are updated. if (mFeatureFlags.supportNrSaRrcIdle()) { OverrideTimerRule nrRules = tempRules.get(STATE_CONNECTED); if (!tempRules.get(STATE_CONNECTED_RRC_IDLE).isDefined() && nrRules.isDefined()) { OverrideTimerRule nrIdleRules = Loading @@ -614,7 +596,6 @@ public class NetworkTypeController extends StateMachine { } tempRules.put(STATE_CONNECTED_RRC_IDLE, nrIdleRules); } } mOverrideTimerRules = tempRules; if (DBG) log("mOverrideTimerRules: " + mOverrideTimerRules); Loading Loading @@ -888,7 +869,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (isLte(rat) && isNrNotRestricted()) { Loading Loading @@ -971,7 +951,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (!isLte(rat) || !isNrNotRestricted()) { Loading Loading @@ -1055,7 +1034,6 @@ public class NetworkTypeController extends StateMachine { transitionTo(mNrConnectedAdvancedState); } else { transitionTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (!isLte(rat) || !isNrNotRestricted()) { Loading Loading @@ -1187,7 +1165,7 @@ public class NetworkTypeController extends StateMachine { @Override public String getName() { return mFeatureFlags.supportNrSaRrcIdle() ? STATE_CONNECTED_RRC_IDLE : STATE_CONNECTED; return STATE_CONNECTED_RRC_IDLE; } } Loading Loading @@ -1222,7 +1200,7 @@ public class NetworkTypeController extends StateMachine { || (isLte(rat) && isNrConnected())) { if (isNrAdvanced()) { transitionTo(mNrConnectedAdvancedState); } else if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { } else if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else { // Update in case the override network type changed Loading @@ -1241,7 +1219,7 @@ public class NetworkTypeController extends StateMachine { if (isUsingPhysicalChannelConfigForRrcDetection()) { mPhysicalLinkStatus = getPhysicalLinkStatusFromPhysicalChannelConfig(); } if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else if (isNrAdvanced()) { transitionTo(mNrConnectedAdvancedState); Loading @@ -1249,7 +1227,7 @@ public class NetworkTypeController extends StateMachine { break; case EVENT_PHYSICAL_LINK_STATUS_CHANGED: mPhysicalLinkStatus = msg.arg1; if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } break; Loading Loading @@ -1314,7 +1292,6 @@ public class NetworkTypeController extends StateMachine { TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE; } transitionWithTimerTo(isPhysicalLinkActive() || !mFeatureFlags.supportNrSaRrcIdle() ? mNrConnectedState : mNrIdleState); } } else if (isLte(rat) && isNrNotRestricted()) { Loading @@ -1330,7 +1307,7 @@ public class NetworkTypeController extends StateMachine { if (isUsingPhysicalChannelConfigForRrcDetection()) { mPhysicalLinkStatus = getPhysicalLinkStatusFromPhysicalChannelConfig(); } if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionWithTimerTo(mNrIdleState); } else if (!isNrAdvanced()) { transitionWithTimerTo(mNrConnectedState); Loading Loading @@ -1425,7 +1402,7 @@ public class NetworkTypeController extends StateMachine { mRatchetedNrBandwidths = Math.max(mRatchetedNrBandwidths, nrBandwidths); mRatchetedNrBands.addAll(nrBands); } else { if (mFeatureFlags.supportNrSaRrcIdle() && mDoesPccListIndicateIdle if (mDoesPccListIndicateIdle && anchorNrCellId != mLastAnchorNrCellId && isUsingPhysicalChannelConfigForRrcDetection() && !mPrimaryCellChangedWhileIdle Loading Loading @@ -1534,7 +1511,7 @@ public class NetworkTypeController extends StateMachine { int dataRat = getDataNetworkType(); IState transitionState; if (dataRat == TelephonyManager.NETWORK_TYPE_NR || (isLte(dataRat) && isNrConnected())) { if (!isPhysicalLinkActive() && mFeatureFlags.supportNrSaRrcIdle()) { if (!isPhysicalLinkActive()) { transitionState = mNrIdleState; } else if (isNrAdvanced()) { transitionState = mNrConnectedAdvancedState; Loading Loading @@ -1842,7 +1819,6 @@ public class NetworkTypeController extends StateMachine { pw.flush(); pw.increaseIndent(); pw.println("mSubId=" + mPhone.getSubId()); pw.println("supportNrSaRrcIdle=" + mFeatureFlags.supportNrSaRrcIdle()); pw.println("mOverrideTimerRules=" + mOverrideTimerRules.toString()); pw.println("mLteEnhancedPattern=" + mLteEnhancedPattern); pw.println("mIsPhysicalChannelConfigOn=" + mIsPhysicalChannelConfigOn); Loading
tests/telephonytests/src/com/android/internal/telephony/NetworkTypeControllerTest.java +11 −10 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { // Capture listener to emulate the carrier config change notification used later ArgumentCaptor<CarrierConfigManager.CarrierConfigChangeListener> listenerArgumentCaptor = ArgumentCaptor.forClass(CarrierConfigManager.CarrierConfigChangeListener.class); setPhysicalLinkStatus(true); mNetworkTypeController = new NetworkTypeController(mPhone, mDisplayInfoController, mFeatureFlags); processAllMessages(); Loading Loading @@ -374,7 +375,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testTransitionToCurrentStateNrConnectedIdle() throws Exception { assertEquals("DefaultState", getCurrentState().getName()); doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(new ArrayList<>()).when(mSST).getPhysicalChannelConfigList(); sendCarrierConfigChanged(); Loading Loading @@ -640,7 +640,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { mNetworkTypeController.sendMessage(11 /* EVENT_PHYSICAL_CHANNEL_CONFIGS_CHANGED */, new AsyncResult(null, new ArrayList<>(), null)); processAllMessages(); assertEquals("connected_mmwave", getCurrentState().getName()); assertEquals("connected_rrc_idle", getCurrentState().getName()); // bands and bandwidths should stay ratcheted as long as anchor NR cell is the same physicalChannelConfigs.remove(pcc2); Loading Loading @@ -704,7 +704,7 @@ public class NetworkTypeControllerTest extends TelephonyTest { mNetworkTypeController.sendMessage(11 /* EVENT_PHYSICAL_CHANNEL_CONFIGS_CHANGED */, new AsyncResult(null, new ArrayList<>(), null)); processAllMessages(); assertEquals("connected_mmwave", getCurrentState().getName()); assertEquals("connected_rrc_idle", getCurrentState().getName()); // bands and bandwidths should change if PCC list changes physicalChannelConfigs.remove(pcc2); Loading Loading @@ -809,7 +809,14 @@ public class NetworkTypeControllerTest extends TelephonyTest { new NetworkTypeController(mPhone, mDisplayInfoController, mFeatureFlags); sendCarrierConfigChanged(); processAllMessages(); testTransitionToCurrentStateNrConnectedMmwave(); // service state of NrConnectedMmwave shouldn't affect the result doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(mServiceState).getNrFrequencyRange(); mNetworkTypeController.sendMessage(3 /* EVENT_SERVICE_STATE_CHANGED */); processAllMessages(); doReturn(NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED).when(mServiceState).getNrState(); mNetworkTypeController.sendMessage(4 /* EVENT_PHYSICAL_LINK_STATUS_CHANGED */, DataCallResponse.LINK_STATUS_ACTIVE); Loading Loading @@ -1252,7 +1259,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testPrimaryTimerPrimaryCellChangeNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1509,7 +1515,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testTransitionToNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(mServiceState).getNrFrequencyRange(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); Loading Loading @@ -1555,7 +1560,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerAdvanceBand() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); doReturn(ServiceState.FREQUENCY_RANGE_HIGH).when(mServiceState).getNrFrequencyRange(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); Loading Loading @@ -1677,7 +1681,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerExpireNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1748,7 +1751,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerResetNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading Loading @@ -1830,7 +1832,6 @@ public class NetworkTypeControllerTest extends TelephonyTest { @Test public void testSecondaryTimerPrimaryCellChangeNrIdle() throws Exception { doReturn(true).when(mFeatureFlags).supportNrSaRrcIdle(); doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); ArrayList<PhysicalChannelConfig> physicalChannelConfigs = new ArrayList<>(); physicalChannelConfigs.add(new PhysicalChannelConfig.Builder() Loading