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

Commit 7d59343c authored by Peter Pan's avatar Peter Pan Committed by Brian Beloshapka
Browse files

Could not enable data connection

Could not enable the default type APN in below case:
1. Default apn exists, connect wifi
2. Delete default apn
3. Disconnect wifi

enableApnType won't reactivate default apn type when no
default apn exists. Add default apn criterium to avoid this.

Change-Id: Ic8699669e576e5d2140852f359e34ed6c3275633
parent 17659aef
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -453,7 +453,8 @@ public final class DcTracker extends DcTrackerBase {
    @Override
    @Override
    public synchronized int enableApnType(String apnType) {
    public synchronized int enableApnType(String apnType) {
        ApnContext apnContext = mApnContexts.get(apnType);
        ApnContext apnContext = mApnContexts.get(apnType);
        if (apnContext == null || !isApnTypeAvailable(apnType)) {
        if (apnContext == null || (!TextUtils.equals(apnType, PhoneConstants.APN_TYPE_DEFAULT)
                && !isApnTypeAvailable(apnType))) {
            if (DBG) log("enableApnType: " + apnType + " is type not available");
            if (DBG) log("enableApnType: " + apnType + " is type not available");
            return PhoneConstants.APN_TYPE_NOT_AVAILABLE;
            return PhoneConstants.APN_TYPE_NOT_AVAILABLE;
        }
        }