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

Commit 3b30f1a9 authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Merge "Fixed that data retry on non-serviced transport" am: a4c3eadc

am: e4945b1c

Change-Id: Ic086c8e3713e74ce527477b0227c9c21dcaca959
parents 964049a7 e4945b1c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -115,7 +115,10 @@ public class DataConnectionReasons {
        RADIO_DISABLED_BY_CARRIER(true),
        RADIO_DISABLED_BY_CARRIER(true),
        APN_NOT_CONNECTABLE(true),
        APN_NOT_CONNECTABLE(true),
        ON_IWLAN(true),
        ON_IWLAN(true),
        IN_ECBM(true);
        IN_ECBM(true),
        ON_OTHER_TRANSPORT(true);   // When data retry occurs, the given APN type's preferred
                                    // transport might be already changed. In this case we
                                    // should disallow data retry.


        private boolean mIsHardReason;
        private boolean mIsHardReason;


+10 −0
Original line number Original line Diff line number Diff line
@@ -1351,6 +1351,16 @@ public class DcTracker extends Handler {
            reasons.add(DataDisallowedReasonType.RADIO_DISABLED_BY_CARRIER);
            reasons.add(DataDisallowedReasonType.RADIO_DISABLED_BY_CARRIER);
        }
        }


        if (apnContext != null) {
            // If the transport has been already switched to the other transport, we should not
            // allow the data setup. The only exception is the handover case, where we setup
            // handover data connection before switching the transport.
            if (mTransportType != mPhone.getTransportManager().getCurrentTransport(
                    apnContext.getApnTypeBitmask()) && requestType != REQUEST_TYPE_HANDOVER) {
                reasons.add(DataDisallowedReasonType.ON_OTHER_TRANSPORT);
            }
        }

        boolean isDataEnabled = apnContext == null ? mDataEnabledSettings.isDataEnabled()
        boolean isDataEnabled = apnContext == null ? mDataEnabledSettings.isDataEnabled()
                : mDataEnabledSettings.isDataEnabled(apnContext.getApnTypeBitmask());
                : mDataEnabledSettings.isDataEnabled(apnContext.getApnTypeBitmask());