Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d99d07a1 authored by Sarah Chin's avatar Sarah Chin Committed by Android Build Coastguard Worker
Browse files

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
(cherry picked from commit d9ac485b)
Merged-In: I68c23f970af2a554ab438f630363be4591664cbb
parent 71177178
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -115,6 +115,7 @@ public final class AccessNetworkConstants {
        /** @hide */
        /** @hide */
        public static @RadioAccessNetworkType int fromString(@NonNull String str) {
        public static @RadioAccessNetworkType int fromString(@NonNull String str) {
            switch (str.toUpperCase()) {
            switch (str.toUpperCase()) {
                case "UNKNOWN": return UNKNOWN;
                case "GERAN": return GERAN;
                case "GERAN": return GERAN;
                case "UTRAN": return UTRAN;
                case "UTRAN": return UTRAN;
                case "EUTRAN": return EUTRAN;
                case "EUTRAN": return EUTRAN;
@@ -122,8 +123,7 @@ public final class AccessNetworkConstants {
                case "IWLAN": return IWLAN;
                case "IWLAN": return IWLAN;
                case "NGRAN": return NGRAN;
                case "NGRAN": return NGRAN;
                default:
                default:
                    Rlog.e(TAG, "Invalid access network type " + str);
                    throw new IllegalArgumentException("Invalid access network type " + str);
                    return UNKNOWN;
            }
            }
        }
        }
    }
    }
+7 −0
Original line number Original line Diff line number Diff line
@@ -8550,6 +8550,13 @@ public class CarrierConfigManager {
     * IWLAN handover rules that determine whether handover is allowed or disallowed between
     * IWLAN handover rules that determine whether handover is allowed or disallowed between
     * cellular and IWLAN.
     * 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.
     * The handover rules will be matched in the order. Here are some sample rules.
     * <string-array name="iwlan_handover_rules" num="5">
     * <string-array name="iwlan_handover_rules" num="5">
     *     <!-- Handover from IWLAN to 2G/3G is not allowed -->
     *     <!-- Handover from IWLAN to 2G/3G is not allowed -->