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

Commit d5adcb04 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am c187f0e9: Handle provisioning APN by turning off/on data.

* commit 'c187f0e9':
  Handle provisioning APN by turning off/on data.
parents ba7c31a4 c187f0e9
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -849,10 +849,6 @@ public abstract class DcTrackerBase extends Handler {
                break;
            }
            case DctConstants.CMD_ENABLE_MOBILE_PROVISIONING: {
                // TODO: Right now we know when it ends "successfully" when
                // provisioning apn gets dropped, what happens if the user never
                // succeed, I assume there is a timeout and the network will drop
                // it after a period of time.
                Bundle bundle = msg.getData();
                if (bundle != null) {
                    try {
@@ -867,18 +863,11 @@ public abstract class DcTrackerBase extends Handler {
                    mIsProvisioning = false;
                    mProvisioningUrl = null;
                } else {
                    ApnContext apnContext = mApnContexts.get(PhoneConstants.APN_TYPE_DEFAULT);
                    if (apnContext.isProvisioningApn() && apnContext.getState() == State.CONNECTED){
                        log("CMD_ENABLE_MOBILE_PROVISIONING: mIsProvisioning=true url="
                                + mProvisioningUrl);
                    loge("CMD_ENABLE_MOBILE_PROVISIONING: provisioningUrl=" + mProvisioningUrl);
                    mIsProvisioning = true;
                    startProvisioningApnAlarm();
                        completeConnection(mApnContexts.get(PhoneConstants.APN_TYPE_DEFAULT));
                    } else {
                        log("CMD_ENABLE_MOBILE_PROVISIONING: No longer connected");
                        mIsProvisioning = false;
                        mProvisioningUrl = null;
                    }
                    onSetInternalDataEnabled(true);
                    enableApnType("default");
                }
                break;
            }