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

Commit c7ce0531 authored by Jack Yu's avatar Jack Yu Committed by Gerrit Code Review
Browse files

Merge "Added more descriptive data disallowed reasons"

parents b2944bf8 ba2912e0
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
@@ -1363,8 +1363,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.