diff options
Diffstat (limited to 'services/QualifiedNetworksService/src/com/android')
9 files changed, 117 insertions, 125 deletions
diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/AccessNetworkEvaluator.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/AccessNetworkEvaluator.java index 255c3b1..320b093 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/AccessNetworkEvaluator.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/AccessNetworkEvaluator.java @@ -989,11 +989,10 @@ class AccessNetworkEvaluator { private boolean isAccessNetworkAllowed(int accessNetwork, int netCapability) { switch (netCapability) { + case NetworkCapabilities.NET_CAPABILITY_EIMS: case NetworkCapabilities.NET_CAPABILITY_IMS: + case NetworkCapabilities.NET_CAPABILITY_XCAP: return mConfigManager.isAccessNetworkAllowed(accessNetwork, netCapability); - case NetworkCapabilities.NET_CAPABILITY_EIMS: - return mConfigManager.isAccessNetworkAllowed( - accessNetwork, NetworkCapabilities.NET_CAPABILITY_IMS); default: if (accessNetwork == AccessNetworkType.UNKNOWN) { return false; diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/IwlanNetworkStatusTracker.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/IwlanNetworkStatusTracker.java index 8175a2a..1377077 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/IwlanNetworkStatusTracker.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/IwlanNetworkStatusTracker.java @@ -394,11 +394,11 @@ class IwlanNetworkStatusTracker { Log.d(sLogTag, "notifyIwlanNetworkStatus for slot: " + slotId); IwlanAvailabilityInfo info = makeIwlanAvailabilityInfo(slotId); if (!info.getIwlanAvailable() && notifyIwlanDisabled) { - Log.d(sLogTag, "setNotifyIwlanDisabled"); + Log.d(sLogTag, "setNotifyIwlanDisabled for slot: " + slotId); info.setNotifyIwlanDisabled(); } if (!info.equals(mLastIwlanAvailabilityInfo.get(slotId))) { - Log.d(sLogTag, "notify updated info"); + Log.d(sLogTag, "notify updated info for slot: " + slotId); if (mIwlanNetworkListenersArray.get(slotId) != null) { mIwlanNetworkListenersArray.get(slotId).notifyResult(info); } diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java index 14d73c1..7ae7e26 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java @@ -652,18 +652,18 @@ public class QnsCallStatusTracker { } private void onUpdateCallQuality(CallQuality cq) { - long now = QnsUtils.getSystemElapsedRealTime(); - CallQualityBlock prev = null; TransportQuality transportQuality = getLastTransportQuality(mTransportType); if (transportQuality != null) { - prev = transportQuality.getLastCallQualityBlock(); - } - if (prev != null) { - prev.mDurationMillis = now - prev.mCreatedElapsedTime; + long now = QnsUtils.getSystemElapsedRealTime(); + CallQualityBlock prev = transportQuality.getLastCallQualityBlock(); + if (prev != null) { + prev.mDurationMillis = now - prev.mCreatedElapsedTime; + } + transportQuality.mCallQualityBlockList.add( + new CallQualityBlock( + cq.getUplinkCallQualityLevel(), cq.getDownlinkCallQualityLevel(), + now)); } - transportQuality.mCallQualityBlockList.add( - new CallQualityBlock( - cq.getUplinkCallQualityLevel(), cq.getDownlinkCallQualityLevel(), now)); } private boolean isDummyCallQuality(CallQuality cq) { @@ -768,23 +768,15 @@ public class QnsCallStatusTracker { if (imsCallStateList.size() == 0) { if (mLastNormalCallType != QnsConstants.CALL_TYPE_IDLE) { mLastNormalCallType = QnsConstants.CALL_TYPE_IDLE; - if (mCallTypeChangedEventListener != null) { - notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastNormalCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastNormalCallType); } if (mLastEmergencyCallType != QnsConstants.CALL_TYPE_IDLE) { mLastEmergencyCallType = QnsConstants.CALL_TYPE_IDLE; if (mEmergencyOverIms) { mEmergencyOverIms = false; - if (mCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); } else { - if (mEmergencyCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); } } } else { @@ -792,23 +784,16 @@ public class QnsCallStatusTracker { if (mLastNormalCallType != QnsConstants.CALL_TYPE_IDLE && !hasVideoCall() && !hasVoiceCall()) { mLastNormalCallType = QnsConstants.CALL_TYPE_IDLE; - if (mCallTypeChangedEventListener != null) { - notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastNormalCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastNormalCallType); + } if (mLastEmergencyCallType != QnsConstants.CALL_TYPE_IDLE && !hasEmergencyCall()) { mLastEmergencyCallType = QnsConstants.CALL_TYPE_IDLE; if (mEmergencyOverIms) { mEmergencyOverIms = false; - if (mCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); } else { - if (mEmergencyCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); } } //2. Notify a new ongoing call type @@ -816,16 +801,10 @@ public class QnsCallStatusTracker { mLastEmergencyCallType = QnsConstants.CALL_TYPE_EMERGENCY; if (!isDataNetworkConnected(NetworkCapabilities.NET_CAPABILITY_EIMS) && isDataNetworkConnected(NetworkCapabilities.NET_CAPABILITY_IMS)) { - if (mCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); - mEmergencyOverIms = true; - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_IMS, mLastEmergencyCallType); + mEmergencyOverIms = true; } else { - if (mEmergencyCallTypeChangedEventListener != null) { - notifyCallType( - NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); - } + notifyCallType(NetworkCapabilities.NET_CAPABILITY_EIMS, mLastEmergencyCallType); } } else if (hasVideoCall()) { if (mLastNormalCallType != QnsConstants.CALL_TYPE_VIDEO) { @@ -846,9 +825,11 @@ public class QnsCallStatusTracker { private void notifyCallType(int netCapability, int callType) { Log.d(mLogTag, "notifyCallType:" + netCapability + ", callType:" + callType); - if (netCapability == NetworkCapabilities.NET_CAPABILITY_IMS) { + if (netCapability == NetworkCapabilities.NET_CAPABILITY_IMS + && mCallTypeChangedEventListener != null) { mCallTypeChangedEventListener.notifyResult(callType); - } else if (netCapability == NetworkCapabilities.NET_CAPABILITY_EIMS) { + } else if (netCapability == NetworkCapabilities.NET_CAPABILITY_EIMS + && mEmergencyCallTypeChangedEventListener != null) { mEmergencyCallTypeChangedEventListener.notifyResult(callType); } if (callType == QnsConstants.CALL_TYPE_IDLE) { diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierAnspSupportConfig.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierAnspSupportConfig.java index f4545cc..d798d8e 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierAnspSupportConfig.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierAnspSupportConfig.java @@ -655,8 +655,8 @@ class QnsCarrierAnspSupportConfig { * <p>{@code 2 values defined by default(Good, Bad)} * * <UL> - * <LI>"Good:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_GOOD}" - * <LI>"Bad:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_BAD}" + * <LI>"Good:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_WIFI_RSSI_GOOD}" + * <LI>"Bad:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_WIFI_RSSI_BAD}" * </UL> * * <p>This key is considered invalid if the format is violated. If the key not configured, a @@ -716,8 +716,8 @@ class QnsCarrierAnspSupportConfig { * <p>{@code 2 values defined by default(Good, Bad)} * * <UL> - * <LI>"Good:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_GOOD}" - * <LI>"Bad:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_BAD}" + * <LI>"Good:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_WIFI_RSSI_GOOD}" + * <LI>"Bad:{@link QnsConstants#KEY_DEFAULT_THRESHOLD_WIFI_RSSI_BAD}" * </UL> * * <p>This key is considered invalid if the format is violated. If the key not configured, a diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierConfigManager.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierConfigManager.java index 2b79227..1f869d1 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierConfigManager.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCarrierConfigManager.java @@ -62,6 +62,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set; @@ -378,25 +379,6 @@ class QnsCarrierConfigManager { static final String KEY_QNS_MMS_TRANSPORT_TYPE_INT = "qns.mms_transport_type_int"; /** - * Specifies the Transport type UE supports with QNS services for XCAP network capability. - * {@link QnsConstants}. The values are set as below: - * - * <ul> - * <li>0: {@link QnsConstants#TRANSPORT_TYPE_ALLOWED_WWAN} - * <li>1: {@link QnsConstants#TRANSPORT_TYPE_ALLOWED_IWLAN} - * <li>2: {@link QnsConstants#TRANSPORT_TYPE_ALLOWED_BOTH} - * </ul> - * - * <p>{@code QnsConstants#TRANSPORT_TYPE_ALLOWED_WWAN}: If set , Transport type UE supports is - * cellular for XCAP network capability. {@code QnsConstants#TRANSPORT_TYPE_ALLOWED_IWLAN}: If - * this value set , Transport type UE supports is Wifi for XCAP network capability. {@code - * QnsConstants#TRANSPORT_TYPE_ALLOWED_BOTH}: If this value set , Transport type UE supports is - * both Cellular & Wifi for XCAP network capability. The default value for this key is {@link - * QnsConstants#TRANSPORT_TYPE_ALLOWED_WWAN} - */ - static final String KEY_QNS_XCAP_TRANSPORT_TYPE_INT = "qns.xcap_transport_type_int"; - - /** * Specifies the Transport type UE supports with QNS services for CBS network capability. {@link * QnsConstants}. The values are set as below: * @@ -486,9 +468,16 @@ class QnsCarrierConfigManager { /** * This item is the minimum handover guarding timer value when there is no guarding time for * handover. + * Note: + * If this value is set to less than or equal to 0, minimum guarding action is disabled. + * if this value is set to greater than or equal to + * {@code QnsConstants#CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT}, + * {@code QnsConstants#CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT} value is set. + * If no value set at asset or paris , QnsConstants#CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER + * value at code is set. * * <p>{@code QnsConstants#CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER} : default value of timer. - * {@code QnsConstants#CONFIg_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT} : maximum allowable + * {@code QnsConstants#CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT} : maximum allowable * value. */ static final String KEY_MINIMUM_HANDOVER_GUARDING_TIMER_MS_INT = @@ -740,7 +729,7 @@ class QnsCarrierConfigManager { private int mQnsImsTransportType; private int mQnsSosTransportType; private int mQnsMmsTransportType; - private int mQnsXcapTransportType; + private int[] mQnsXcapSupportedAccessNetworkTypes; private int mQnsCbsTransportType; private int mXcapRatPreference; private int mSosRatPreference; @@ -1327,8 +1316,11 @@ class QnsCarrierConfigManager { getConfig(bundleCarrier, bundleAsset, KEY_QNS_SOS_TRANSPORT_TYPE_INT); mQnsMmsTransportType = getConfig(bundleCarrier, bundleAsset, KEY_QNS_MMS_TRANSPORT_TYPE_INT); - mQnsXcapTransportType = - getConfig(bundleCarrier, bundleAsset, KEY_QNS_XCAP_TRANSPORT_TYPE_INT); + mQnsXcapSupportedAccessNetworkTypes = + getConfig( + bundleCarrier, + bundleAsset, + CarrierConfigManager.ImsSs.KEY_XCAP_OVER_UT_SUPPORTED_RATS_INT_ARRAY); mQnsCbsTransportType = getConfig(bundleCarrier, bundleAsset, KEY_QNS_CBS_TRANSPORT_TYPE_INT); mQnsCbsTransportType = @@ -1957,7 +1949,19 @@ class QnsCarrierConfigManager { } else if (netCapability == NetworkCapabilities.NET_CAPABILITY_MMS) { return mQnsMmsTransportType; } else if (netCapability == NetworkCapabilities.NET_CAPABILITY_XCAP) { - return mQnsXcapTransportType; + HashSet<Integer> supportedTransportType = new HashSet<>(); + if (mQnsXcapSupportedAccessNetworkTypes != null) { + Arrays.stream(mQnsXcapSupportedAccessNetworkTypes) + .forEach(accessNetwork -> supportedTransportType.add( + QnsUtils.getTransportTypeFromAccessNetwork(accessNetwork))); + } + if (supportedTransportType.contains(AccessNetworkConstants.TRANSPORT_TYPE_WLAN)) { + if (supportedTransportType.contains(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)) { + return QnsConstants.TRANSPORT_TYPE_ALLOWED_BOTH; + } + return QnsConstants.TRANSPORT_TYPE_ALLOWED_IWLAN; + } + return QnsConstants.TRANSPORT_TYPE_ALLOWED_WWAN; } else if (netCapability == NetworkCapabilities.NET_CAPABILITY_CBS) { return mQnsCbsTransportType; } @@ -2040,10 +2044,10 @@ class QnsCarrierConfigManager { */ int getMinimumHandoverGuardingTimer() { int timer = mMinimumHandoverGuardingTimer; - if (timer < QnsConstants.CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER) { - timer = QnsConstants.CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER; + if (timer <= 0) { + return 0; } - if (timer > QnsConstants.CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT) { + if (timer >= QnsConstants.CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT) { timer = QnsConstants.CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT; } return timer; @@ -2375,8 +2379,10 @@ class QnsCarrierConfigManager { || mQnsMmsTransportType == QnsConstants.TRANSPORT_TYPE_ALLOWED_BOTH) { netCapabilities.add(NetworkCapabilities.NET_CAPABILITY_MMS); } - if (mQnsXcapTransportType == QnsConstants.TRANSPORT_TYPE_ALLOWED_IWLAN - || mQnsXcapTransportType == QnsConstants.TRANSPORT_TYPE_ALLOWED_BOTH) { + if (mQnsXcapSupportedAccessNetworkTypes != null + && Arrays.stream(mQnsXcapSupportedAccessNetworkTypes) + .anyMatch(accessNetwork -> QnsUtils.getTransportTypeFromAccessNetwork( + accessNetwork) == AccessNetworkConstants.TRANSPORT_TYPE_WLAN)) { netCapabilities.add(NetworkCapabilities.NET_CAPABILITY_XCAP); } if (mQnsCbsTransportType == QnsConstants.TRANSPORT_TYPE_ALLOWED_IWLAN @@ -2386,34 +2392,42 @@ class QnsCarrierConfigManager { return netCapabilities; } + private static HashMap<Integer, String> sRatStringMatcher; + static { + sRatStringMatcher = new HashMap<>(); + sRatStringMatcher.put(AccessNetworkConstants.AccessNetworkType.EUTRAN, "LTE"); + sRatStringMatcher.put(AccessNetworkConstants.AccessNetworkType.NGRAN, "NR"); + sRatStringMatcher.put(AccessNetworkConstants.AccessNetworkType.UTRAN, "3G"); + sRatStringMatcher.put(AccessNetworkConstants.AccessNetworkType.GERAN, "2G"); + } + /** * This method returns Allowed cellular RAT for IMS * - * @param accessNetwork , netCapability : EUTRAN / NGRAN / UTRAN/ GERAN + * @param accessNetwork : (EUTRAN, NGRAN, UTRAN, GERAN) + * @param netCapability : (ims, sos, mms, xcap, cbs) * @return : True or False based on configuration */ boolean isAccessNetworkAllowed(int accessNetwork, int netCapability) { - // cases to be enhanced for different key items when added - if (netCapability == NetworkCapabilities.NET_CAPABILITY_IMS) { - if (mImsAllowedRats != null) { - for (String cellularRatType : mImsAllowedRats) { - if ((cellularRatType.contains("LTE") - && accessNetwork - == AccessNetworkConstants.AccessNetworkType.EUTRAN) - || (cellularRatType.contains("NR") - && accessNetwork - == AccessNetworkConstants.AccessNetworkType.NGRAN) - || (cellularRatType.contains("3G") - && accessNetwork - == AccessNetworkConstants.AccessNetworkType.UTRAN) - || (cellularRatType.contains("2G") - && accessNetwork - == AccessNetworkConstants.AccessNetworkType.GERAN)) { - return true; - } + switch (netCapability) { + case NetworkCapabilities.NET_CAPABILITY_EIMS: + case NetworkCapabilities.NET_CAPABILITY_IMS: + // cases to be enhanced for different key items when added + String ratName = sRatStringMatcher.get(accessNetwork); + if (mImsAllowedRats != null + && ratName != null + && Arrays.stream(mImsAllowedRats) + .anyMatch(ratType -> TextUtils.equals(ratType, ratName))) { + return true; } - } + break; + case NetworkCapabilities.NET_CAPABILITY_XCAP: + return mQnsXcapSupportedAccessNetworkTypes != null + && Arrays.stream(mQnsXcapSupportedAccessNetworkTypes) + .anyMatch(xcapAccessNetwork -> accessNetwork == xcapAccessNetwork); + default: + return false; } return false; } diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsComponents.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsComponents.java index 4d33f5a..1c9b898 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsComponents.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsComponents.java @@ -275,7 +275,7 @@ class QnsComponents { } QnsImsManager qnsImsManager = mQnsImsManagers.get(slotId); if (qnsImsManager != null) { - mQnsTelephonyListeners.remove(slotId); + mQnsImsManagers.remove(slotId); qnsImsManager.close(); } QnsTelephonyListener qnsTelephonyListener = mQnsTelephonyListeners.get(slotId); diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsConstants.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsConstants.java index 94ae31d..c60cf3e 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsConstants.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsConstants.java @@ -31,28 +31,26 @@ class QnsConstants { static final int INVALID_VALUE = -1; static final int INVALID_ID = -1; - static final int INVALID_SUB_ID = -1; static final int KEY_DEFAULT_VALUE = 0; static final int KEY_DEFAULT_HYST_TIMER = 30000; - static final int CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER = 0; + static final int CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER = 3000; static final int CONFIG_DEFAULT_MIN_HANDOVER_GUARDING_TIMER_LIMIT = 5000; - static final int KEY_DEFAULT_PACKET_LOSS_TIME_MILLIS = 5000; + static final int KEY_DEFAULT_PACKET_LOSS_TIME_MILLIS = 3000; static final int KEY_DEFAULT_IWLAN_AVOID_TIME_LOW_RTP_QUALITY_MILLIS = 60000; - - static final int KEY_DEFAULT_THRESHOLD_SSRSRP_GOOD = -99; - static final int KEY_DEFAULT_THRESHOLD_SSRSRP_BAD = -111; - static final int KEY_DEFAULT_THRESHOLD_RSRP_GOOD = -99; - static final int KEY_DEFAULT_THRESHOLD_RSRP_BAD = -111; - static final int KEY_DEFAULT_THRESHOLD_RSCP_GOOD = -90; - static final int KEY_DEFAULT_THRESHOLD_RSCP_BAD = -100; - static final int KEY_DEFAULT_THRESHOLD_GERAN_RSSI_GOOD = -90; - static final int KEY_DEFAULT_THRESHOLD_GERAN_RSSI_BAD = -100; - static final int KEY_DEFAULT_THRESHOLD_WIFI_RSSI_GOOD = -70; + static final int KEY_DEFAULT_WWAN_AVOID_TIME_LOW_RTP_QUALITY_MILLIS = 60000; + + static final int KEY_DEFAULT_THRESHOLD_SSRSRP_GOOD = -110; + static final int KEY_DEFAULT_THRESHOLD_SSRSRP_BAD = -115; + static final int KEY_DEFAULT_THRESHOLD_RSRP_GOOD = -115; + static final int KEY_DEFAULT_THRESHOLD_RSRP_BAD = -120; + static final int KEY_DEFAULT_THRESHOLD_RSCP_GOOD = -105; + static final int KEY_DEFAULT_THRESHOLD_RSCP_BAD = -115; + static final int KEY_DEFAULT_THRESHOLD_GERAN_RSSI_GOOD = -100; + static final int KEY_DEFAULT_THRESHOLD_GERAN_RSSI_BAD = -105; + static final int KEY_DEFAULT_THRESHOLD_WIFI_RSSI_GOOD = -75; static final int KEY_DEFAULT_THRESHOLD_WIFI_RSSI_BAD = -80; - static final int KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_GOOD = -65; - static final int KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_BAD = -75; static final int CALL_TYPE_IDLE = 0; static final int CALL_TYPE_VOICE = 1; @@ -184,7 +182,6 @@ class QnsConstants { static final int SIGNAL_AVAILABLE = 1; static final int DEFAULT_WIFI_BACKHAUL_TIMER = 3000; - static final int DEFAULT_MSG_DELAY_TIMER = 1000; static final int TRANSPORT_TYPE_ALLOWED_WWAN = 0; static final int TRANSPORT_TYPE_ALLOWED_IWLAN = 1; diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsTelephonyListener.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsTelephonyListener.java index 51414e1..32883d4 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsTelephonyListener.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsTelephonyListener.java @@ -364,6 +364,7 @@ class QnsTelephonyListener { * @param h the handler to get event. */ void unregisterCallStateChanged(Handler h) { + log("unregisterCallStateChanged"); if (h != null) { mCallStateListener.remove(h); } @@ -387,6 +388,7 @@ class QnsTelephonyListener { * @param h the handler to get event. */ void unregisterSubscriptionIdChanged(Handler h) { + log("unregisterSubscriptionIdChanged"); if (h != null) { mSubscriptionIdListener.remove(h); } @@ -398,6 +400,7 @@ class QnsTelephonyListener { * @param h the handler to get event. */ void unregisterIwlanServiceStateChanged(Handler h) { + log("unregisterIwlanServiceStateChanged"); if (h != null) { mIwlanServiceStateListener.remove(h); } diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsUtils.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsUtils.java index b500ccf..85ae192 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsUtils.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsUtils.java @@ -625,7 +625,6 @@ class QnsUtils { case QnsCarrierConfigManager.KEY_QNS_IMS_TRANSPORT_TYPE_INT: return (T) Integer.valueOf(QnsConstants.TRANSPORT_TYPE_ALLOWED_BOTH); case QnsCarrierConfigManager.KEY_QNS_MMS_TRANSPORT_TYPE_INT: - case QnsCarrierConfigManager.KEY_QNS_XCAP_TRANSPORT_TYPE_INT: case QnsCarrierConfigManager.KEY_QNS_CBS_TRANSPORT_TYPE_INT: case QnsCarrierConfigManager.KEY_QNS_SOS_TRANSPORT_TYPE_INT: return (T) Integer.valueOf(QnsConstants.TRANSPORT_TYPE_ALLOWED_WWAN); @@ -662,7 +661,7 @@ class QnsUtils { return (T) new int[] { QnsConstants.KEY_DEFAULT_IWLAN_AVOID_TIME_LOW_RTP_QUALITY_MILLIS, - QnsConstants.KEY_DEFAULT_VALUE + QnsConstants.KEY_DEFAULT_WWAN_AVOID_TIME_LOW_RTP_QUALITY_MILLIS, }; case QnsCarrierConfigManager.KEY_IMS_WWAN_HYSTERESIS_TIMER_MS_INT_ARRAY: case QnsCarrierConfigManager.KEY_IMS_WLAN_HYSTERESIS_TIMER_MS_INT_ARRAY: @@ -681,6 +680,7 @@ class QnsUtils { return (T) new String[] {"LTE", "NR"}; case QnsCarrierAnspSupportConfig.KEY_IDLE_NGRAN_SSRSRP_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_VOICE_NGRAN_SSRSRP_INT_ARRAY: + case QnsCarrierAnspSupportConfig.KEY_VIDEO_NGRAN_SSRSRP_INT_ARRAY: return (T) new int[] { QnsConstants.KEY_DEFAULT_THRESHOLD_SSRSRP_GOOD, @@ -689,6 +689,7 @@ class QnsUtils { }; case QnsCarrierAnspSupportConfig.KEY_IDLE_EUTRAN_RSRP_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_VOICE_EUTRAN_RSRP_INT_ARRAY: + case QnsCarrierAnspSupportConfig.KEY_VIDEO_EUTRAN_RSRP_INT_ARRAY: return (T) new int[] { QnsConstants.KEY_DEFAULT_THRESHOLD_RSRP_GOOD, @@ -697,6 +698,7 @@ class QnsUtils { }; case QnsCarrierAnspSupportConfig.KEY_IDLE_UTRAN_RSCP_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_VOICE_UTRAN_RSCP_INT_ARRAY: + case QnsCarrierAnspSupportConfig.KEY_VIDEO_UTRAN_RSCP_INT_ARRAY: return (T) new int[] { QnsConstants.KEY_DEFAULT_THRESHOLD_RSCP_GOOD, @@ -705,6 +707,7 @@ class QnsUtils { }; case QnsCarrierAnspSupportConfig.KEY_IDLE_GERAN_RSSI_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_VOICE_GERAN_RSSI_INT_ARRAY: + case QnsCarrierAnspSupportConfig.KEY_VIDEO_GERAN_RSSI_INT_ARRAY: return (T) new int[] { QnsConstants.KEY_DEFAULT_THRESHOLD_GERAN_RSSI_GOOD, @@ -713,17 +716,12 @@ class QnsUtils { }; case QnsCarrierAnspSupportConfig.KEY_IDLE_WIFI_RSSI_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_VOICE_WIFI_RSSI_INT_ARRAY: + case QnsCarrierAnspSupportConfig.KEY_VIDEO_WIFI_RSSI_INT_ARRAY: return (T) new int[] { QnsConstants.KEY_DEFAULT_THRESHOLD_WIFI_RSSI_GOOD, QnsConstants.KEY_DEFAULT_THRESHOLD_WIFI_RSSI_BAD }; - case QnsCarrierAnspSupportConfig.KEY_VIDEO_WIFI_RSSI_INT_ARRAY: - return (T) - new int[] { - QnsConstants.KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_GOOD, - QnsConstants.KEY_DEFAULT_THRESHOLD_VIDEO_WIFI_RSSI_BAD - }; case QnsCarrierAnspSupportConfig.KEY_OVERRIDE_WIFI_PREF_IDLE_WIFI_RSSI_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_OVERRIDE_WIFI_PREF_VOICE_WIFI_RSSI_INT_ARRAY: case QnsCarrierAnspSupportConfig.KEY_OVERRIDE_WIFI_PREF_VIDEO_WIFI_RSSI_INT_ARRAY: |