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

Commit 1a1117d3 authored by Jack Yu's avatar Jack Yu Committed by Automerger Merge Worker
Browse files

Merge "Added more descriptive data disallowed reasons" am: c7ce0531 am: a05c7603

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1371334

Change-Id: Icaf46aedb638bc25f10f16bf560f916b166eb297
parents b0116452 a05c7603
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -113,7 +113,12 @@ public class DataConnectionReasons {
        UNDESIRED_POWER_STATE(true),
        INTERNAL_DATA_DISABLED(true),
        RADIO_DISABLED_BY_CARRIER(true),
        APN_NOT_CONNECTABLE(true),
        APN_NOT_CONNECTABLE(true),  // Not in the right state for data call setup.
        DATA_IS_CONNECTING(true),   // Data is in connecting state. No need to send another setup
                                    // request.
        DATA_IS_DISCONNECTING(true),    // Data is being disconnected. Telephony will retry after
                                        // disconnected.
        DATA_ALREADY_CONNECTED(true),   // Data is already connected. No need to setup data again.
        ON_IWLAN(true),
        IN_ECBM(true),
        ON_OTHER_TRANSPORT(true);   // When data retry occurs, the given APN type's preferred
+10 −1
Original line number Diff line number Diff line
@@ -1367,8 +1367,17 @@ public class DcTracker extends Handler {

        // Step 3. Build disallowed reasons.
        if (apnContext != null && !apnContext.isConnectable()) {
            DctConstants.State state = apnContext.getState();
            if (state == DctConstants.State.CONNECTED) {
                reasons.add(DataDisallowedReasonType.DATA_ALREADY_CONNECTED);
            } else if (state == DctConstants.State.DISCONNECTING) {
                reasons.add(DataDisallowedReasonType.DATA_IS_DISCONNECTING);
            } else if (state == DctConstants.State.CONNECTING) {
                reasons.add(DataDisallowedReasonType.DATA_IS_CONNECTING);
            } else {
                reasons.add(DataDisallowedReasonType.APN_NOT_CONNECTABLE);
            }
        }

        // In legacy mode, if RAT is IWLAN then don't allow default/IA PDP at all.
        // Rest of APN types can be evaluated for remaining conditions.