Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +20 −14 Original line number Diff line number Diff line Loading @@ -5040,19 +5040,23 @@ public class ServiceStateTracker extends Handler { List<SubscriptionInfo> subInfoList = SubscriptionController.getInstance() .getActiveSubscriptionInfoList(mPhone.getContext().getOpPackageName(), mPhone.getContext().getAttributionTag()); if (!ArrayUtils.isEmpty(subInfoList)) { for (SubscriptionInfo info : subInfoList) { // If we have an active opportunistic subscription whose data is IN_SERVICE, we needs // to get signal strength to decide data switching threshold. In this case, we poll // latest signal strength from modem. // If we have an active opportunistic subscription whose data is IN_SERVICE, // we need to get signal strength to decide data switching threshold. In this case, // we poll latest signal strength from modem. if (info.isOpportunistic()) { TelephonyManager tm = TelephonyManager.from(mPhone.getContext()) .createForSubscriptionId(info.getSubscriptionId()); ServiceState ss = tm.getServiceState(); if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { return true; } } } } return false; } Loading Loading @@ -5749,6 +5753,7 @@ public class ServiceStateTracker extends Handler { public Set<Integer> getNrContextIds() { Set<Integer> idSet = new HashSet<>(); if (!ArrayUtils.isEmpty(mLastPhysicalChannelConfigList)) { for (PhysicalChannelConfig config : mLastPhysicalChannelConfigList) { if (isNrPhysicalChannelConfig(config)) { for (int id : config.getContextIds()) { Loading @@ -5756,6 +5761,7 @@ public class ServiceStateTracker extends Handler { } } } } return idSet; } Loading Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +20 −14 Original line number Diff line number Diff line Loading @@ -5040,19 +5040,23 @@ public class ServiceStateTracker extends Handler { List<SubscriptionInfo> subInfoList = SubscriptionController.getInstance() .getActiveSubscriptionInfoList(mPhone.getContext().getOpPackageName(), mPhone.getContext().getAttributionTag()); if (!ArrayUtils.isEmpty(subInfoList)) { for (SubscriptionInfo info : subInfoList) { // If we have an active opportunistic subscription whose data is IN_SERVICE, we needs // to get signal strength to decide data switching threshold. In this case, we poll // latest signal strength from modem. // If we have an active opportunistic subscription whose data is IN_SERVICE, // we need to get signal strength to decide data switching threshold. In this case, // we poll latest signal strength from modem. if (info.isOpportunistic()) { TelephonyManager tm = TelephonyManager.from(mPhone.getContext()) .createForSubscriptionId(info.getSubscriptionId()); ServiceState ss = tm.getServiceState(); if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { return true; } } } } return false; } Loading Loading @@ -5749,6 +5753,7 @@ public class ServiceStateTracker extends Handler { public Set<Integer> getNrContextIds() { Set<Integer> idSet = new HashSet<>(); if (!ArrayUtils.isEmpty(mLastPhysicalChannelConfigList)) { for (PhysicalChannelConfig config : mLastPhysicalChannelConfigList) { if (isNrPhysicalChannelConfig(config)) { for (int id : config.getContextIds()) { Loading @@ -5756,6 +5761,7 @@ public class ServiceStateTracker extends Handler { } } } } return idSet; } Loading