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

Commit 27194756 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed permananent failure behaviors

1. Non-conditional based evaluations will no longer trigger
   setup data if the APN was marked as permanent failure earlier.
   Only environmental changes can result in data setup.
2. Permanent failure can be only applied to the failed APN. When
   this happens, frameworks retries the next non-permanent-failed
   APN.

Fix: 254752857
Fix: 249908875
Test: Manual (verified on JP carrier) + atest FrameworksTelephonyTests
     + Basic testing.
Merged-In: Ic43100635907153bce9631473c56f1edef187fc4
Change-Id: Ic43100635907153bce9631473c56f1edef187fc4
parent 2d31fcf3
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -1180,7 +1180,10 @@ public class CarrierConfigManager {
            "carrier_data_call_retry_network_requested_max_count_int";

    /**
     * Data call setup permanent failure causes by the carrier
     * Data call setup permanent failure causes by the carrier.
     *
     * This API key was added in mistake and is not used anymore by the telephony data
     * frameworks.
     */
    public static final String KEY_CARRIER_DATA_CALL_PERMANENT_FAILURE_STRINGS =
            "carrier_data_call_permanent_failure_strings";
@@ -8308,7 +8311,8 @@ public class CarrierConfigManager {
     *
     * The syntax of the retry rule:
     * 1. Retry based on {@link NetworkCapabilities}. Note that only APN-type network capabilities
     *    are supported.
     *    are supported. If the capabilities are not specified, then the retry rule only applies
     *    to the current failed APN used in setup data call request.
     * "capabilities=[netCaps1|netCaps2|...], [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]"
     *
     * 2. Retry based on {@link DataFailCause}
@@ -8319,15 +8323,16 @@ public class CarrierConfigManager {
     * "capabilities=[netCaps1|netCaps2|...], fail_causes=[cause1|cause2|cause3|...],
     *     [retry_interval=n1|n2|n3|n4...], [maximum_retries=n]"
     *
     * 4. Permanent fail causes (no timer-based retry) on the current failed APN. Retry interval
     *    is specified for retrying the next available APN.
     * "permanent_fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|65543|65547|
     *     2252|2253|2254, retry_interval=2500"
     *
     * For example,
     * "capabilities=eims, retry_interval=1000, maximum_retries=20" means if the attached
     * network request is emergency, then retry data network setup every 1 second for up to 20
     * times.
     *
     * "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2253|2254
     * , maximum_retries=0" means for those fail causes, never retry with timers. Note that
     * when environment changes, retry can still happen.
     *
     * "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|"
     * "5000|10000|15000|20000|40000|60000|120000|240000|600000|1200000|1800000"
     * "1800000, maximum_retries=20" means for those capabilities, retry happens in 2.5s, 3s, 5s,
@@ -9205,8 +9210,13 @@ public class CarrierConfigManager {
        sDefaults.putStringArray(
                KEY_TELEPHONY_DATA_SETUP_RETRY_RULES_STRING_ARRAY, new String[] {
                        "capabilities=eims, retry_interval=1000, maximum_retries=20",
                        "fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|-3|2252|"
                                + "2253|2254, maximum_retries=0", // No retry for those causes
                        // Permanent fail causes. When setup data call fails with the following
                        // fail causes, telephony data frameworks will stop timer-based retry on
                        // the failed APN until power cycle, APM, or some special events. Note that
                        // even though timer-based retry is not performed, condition-based (RAT
                        // changes, registration state changes) retry can still happen.
                        "permanent_fail_causes=8|27|28|29|30|32|33|35|50|51|111|-5|-6|65537|65538|"
                                + "-3|65543|65547|2252|2253|2254, retry_interval=2500",
                        "capabilities=mms|supl|cbs, retry_interval=2000",
                        "capabilities=internet|enterprise|dun|ims|fota, retry_interval=2500|3000|"
                                + "5000|10000|15000|20000|40000|60000|120000|240000|"