From d9ac485b1f804746a51da7f4f14578548fa4f5a7 Mon Sep 17 00:00:00 2001 From: Sarah Chin Date: Wed, 1 Jun 2022 17:08:53 -0700 Subject: [PATCH] Supported UNKNOWN in IWLAN handover rule Extended handover rule to support the scenario that handover should be blocked when source network goes out of service. Test: Basic testing + Wifi calling handover test + atest DataNetworkControllerTest Bug: 234095834 Change-Id: I68c23f970af2a554ab438f630363be4591664cbb --- .../telephony/AccessNetworkConstants.java | 16 ++++++++-------- .../android/telephony/CarrierConfigManager.java | 7 +++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java index 4469ffc144470..7eec86a40c130 100644 --- a/telephony/java/android/telephony/AccessNetworkConstants.java +++ b/telephony/java/android/telephony/AccessNetworkConstants.java @@ -115,15 +115,15 @@ public final class AccessNetworkConstants { /** @hide */ public static @RadioAccessNetworkType int fromString(@NonNull String str) { switch (str.toUpperCase()) { - case "GERAN" : return GERAN; - case "UTRAN" : return UTRAN; - case "EUTRAN" : return EUTRAN; - case "CDMA2000" : return CDMA2000; - case "IWLAN" : return IWLAN; - case "NGRAN" : return NGRAN; + case "UNKNOWN": return UNKNOWN; + case "GERAN": return GERAN; + case "UTRAN": return UTRAN; + case "EUTRAN": return EUTRAN; + case "CDMA2000": return CDMA2000; + case "IWLAN": return IWLAN; + case "NGRAN": return NGRAN; default: - Rlog.e(TAG, "Invalid access network type " + str); - return UNKNOWN; + throw new IllegalArgumentException("Invalid access network type " + str); } } } diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 70fe6b10ef20c..e032f65f34276 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -8550,6 +8550,13 @@ public class CarrierConfigManager { * IWLAN handover rules that determine whether handover is allowed or disallowed between * cellular and IWLAN. * + * Rule syntax: "source=[GERAN|UTRAN|EUTRAN|NGRAN|IWLAN|UNKNOWN], target=[GERAN|UTRAN|EUTRAN + * |NGRAN|IWLAN], type=[allowed|disallowed], roaming=[true|false], capabilities=[INTERNET|MMS + * |FOTA|IMS|CBS|SUPL|EIMS|XCAP|DUN]" + * + * Note that UNKNOWN can be only specified in the source access network and can be only used + * in the disallowed rule. + * * The handover rules will be matched in the order. Here are some sample rules. * *