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

Commit 63edf6c4 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Rename PhoneBase's DataConnectionTracker member.

Was called mDataConnection, but this is more confusing now that we have multiple
DataConnections.  Changed it to the more correct mDataConnectionTracker.

Change-Id: I3cdc4f2897d60e5b0885891744aa6ff2db27af37
parent 5203a5bc
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ public abstract class PhoneBase extends Handler implements Phone {
    public CommandsInterface mCM;
    protected IccFileHandler mIccFileHandler;
    boolean mDnsCheckDisabled = false;
    public DataConnectionTracker mDataConnection;
    public DataConnectionTracker mDataConnectionTracker;
    boolean mDoesRilSendMultipleCallRing;
    int mCallRingContinueToken = 0;
    int mCallRingDelay;
@@ -243,7 +243,7 @@ public abstract class PhoneBase extends Handler implements Phone {
        synchronized(PhoneProxy.lockForRadioTechnologyChange) {
            mCM.unSetOnCallRing(this);
            // Must cleanup all connectionS and needs to use sendMessage!
            mDataConnection.cleanUpAllConnections(null);
            mDataConnectionTracker.cleanUpAllConnections(null);
            mIsTheCurrentActivePhone = false;
        }
    }
@@ -974,31 +974,31 @@ public abstract class PhoneBase extends Handler implements Phone {
     }

    public String[] getActiveApnTypes() {
        return mDataConnection.getActiveApnTypes();
        return mDataConnectionTracker.getActiveApnTypes();
    }

    public String getActiveApnHost() {
        return mDataConnection.getActiveApnString();
        return mDataConnectionTracker.getActiveApnString();
    }

    public LinkProperties getLinkProperties(String apnType) {
        return mDataConnection.getLinkProperties(apnType);
        return mDataConnectionTracker.getLinkProperties(apnType);
    }

    public LinkCapabilities getLinkCapabilities(String apnType) {
        return mDataConnection.getLinkCapabilities(apnType);
        return mDataConnectionTracker.getLinkCapabilities(apnType);
    }

    public int enableApnType(String type) {
        return mDataConnection.enableApnType(type);
        return mDataConnectionTracker.enableApnType(type);
    }

    public int disableApnType(String type) {
        return mDataConnection.disableApnType(type);
        return mDataConnectionTracker.disableApnType(type);
    }

    public boolean isDataConnectivityPossible() {
        return ((mDataConnection != null) && (mDataConnection.isDataPossible()));
        return ((mDataConnectionTracker != null) && (mDataConnectionTracker.isDataPossible()));
    }

    /**
@@ -1028,7 +1028,7 @@ public abstract class PhoneBase extends Handler implements Phone {
                break;
        }

        mDataConnection.setState(dcState);
        mDataConnectionTracker.setState(dcState);
        notifyDataConnection(null, Phone.APN_TYPE_DEFAULT);
    }

+6 −6
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public class CDMALTEPhone extends CDMAPhone {
    @Override
    public DataState getDataConnectionState(String apnType) {
        boolean isCdmaDataConnectionTracker = false;
        if (mDataConnection instanceof CdmaDataConnectionTracker) {
        if (mDataConnectionTracker instanceof CdmaDataConnectionTracker) {
            isCdmaDataConnectionTracker = true;
        }
        log("getDataConnectionState");
@@ -119,10 +119,10 @@ public class CDMALTEPhone extends CDMAPhone {
            // If we're out of service, open TCP sockets may still work
            // but no data will flow
            ret = DataState.DISCONNECTED;
        } else if (mDataConnection.isApnTypeEnabled(apnType) == false) {
        } else if (mDataConnectionTracker.isApnTypeEnabled(apnType) == false) {
            ret = DataState.DISCONNECTED;
        } else {
            switch (mDataConnection.getState(apnType)) {
            switch (mDataConnectionTracker.getState(apnType)) {
                case FAILED:
                case IDLE:
                    ret = DataState.DISCONNECTED;
@@ -164,10 +164,10 @@ public class CDMALTEPhone extends CDMAPhone {
    }

    public String getActiveApn(String apnType) {
        if (mDataConnection instanceof CdmaDataConnectionTracker)
            return mDataConnection.getActiveApnString();
        if (mDataConnectionTracker instanceof CdmaDataConnectionTracker)
            return mDataConnectionTracker.getActiveApnString();

        return ((GsmDataConnectionTracker)mDataConnection).getActiveApnString(apnType);
        return ((GsmDataConnectionTracker)mDataConnectionTracker).getActiveApnString(apnType);
    }

    protected void log(String s) {
+11 −11
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ public class CDMAPhone extends PhoneBase {
        mSMS = new CdmaSMSDispatcher(this);
        mIccFileHandler = new RuimFileHandler(this);
        mRuimRecords = new RuimRecords(this);
        mDataConnection = new CdmaDataConnectionTracker (this);
        mDataConnectionTracker = new CdmaDataConnectionTracker (this);
        mRuimCard = new RuimCard(this);
        mRuimPhoneBookInterfaceManager = new RuimPhoneBookInterfaceManager(this);
        mRuimSmsInterfaceManager = new RuimSmsInterfaceManager(this, mSMS);
@@ -237,7 +237,7 @@ public class CDMAPhone extends PhoneBase {

            //Force all referenced classes to unregister their former registered events
            mCT.dispose();
            mDataConnection.dispose();
            mDataConnectionTracker.dispose();
            mSST.dispose();
            mSMS.dispose();
            mIccFileHandler.dispose(); // instance of RuimFileHandler
@@ -259,7 +259,7 @@ public class CDMAPhone extends PhoneBase {
            this.mRuimRecords = null;
            this.mIccFileHandler = null;
            this.mRuimCard = null;
            this.mDataConnection = null;
            this.mDataConnectionTracker = null;
            this.mCT = null;
            this.mSST = null;
            this.mEriManager = null;
@@ -338,7 +338,7 @@ public class CDMAPhone extends PhoneBase {

        if (mSST.getCurrentCdmaDataConnectionState() == ServiceState.STATE_IN_SERVICE) {

            switch (mDataConnection.getActivity()) {
            switch (mDataConnectionTracker.getActivity()) {
                case DATAIN:
                    ret = DataActivityState.DATAIN;
                break;
@@ -564,7 +564,7 @@ public class CDMAPhone extends PhoneBase {
    }

    public void setDataRoamingEnabled(boolean enable) {
        mDataConnection.setDataOnRoamingEnabled(enable);
        mDataConnectionTracker.setDataOnRoamingEnabled(enable);
    }

    public void registerForCdmaOtaStatusChange(Handler h, int what, Object obj) {
@@ -629,11 +629,11 @@ public class CDMAPhone extends PhoneBase {
            // If we're out of service, open TCP sockets may still work
            // but no data will flow
            ret = DataState.DISCONNECTED;
        } else if (mDataConnection.isApnTypeEnabled(apnType) == false ||
                mDataConnection.isApnTypeActive(apnType) == false) {
        } else if (mDataConnectionTracker.isApnTypeEnabled(apnType) == false ||
                mDataConnectionTracker.isApnTypeActive(apnType) == false) {
            ret = DataState.DISCONNECTED;
        } else {
            switch (mDataConnection.getState(apnType)) {
            switch (mDataConnectionTracker.getState(apnType)) {
                case FAILED:
                case IDLE:
                    ret = DataState.DISCONNECTED;
@@ -724,11 +724,11 @@ public class CDMAPhone extends PhoneBase {
    }

    public boolean getDataRoamingEnabled() {
        return mDataConnection.getDataOnRoamingEnabled();
        return mDataConnectionTracker.getDataOnRoamingEnabled();
    }

    public List<DataConnection> getCurrentDataConnectionList () {
        return mDataConnection.getAllDataConnections();
        return mDataConnectionTracker.getAllDataConnections();
    }

    public void setVoiceMailNumber(String alphaTag,
@@ -929,7 +929,7 @@ public class CDMAPhone extends PhoneBase {
            // send an Intent
            sendEmergencyCallbackModeChange();
            // Re-initiate data connection
            mDataConnection.setInternalDataEnabled(true);
            mDataConnectionTracker.setInternalDataEnabled(true);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -1062,7 +1062,7 @@ public final class CdmaCallTracker extends CallTracker {
        if (PhoneNumberUtils.isEmergencyNumber(dialString)) {
            if (Phone.DEBUG_PHONE) log("disableDataCallInEmergencyCall");
            mIsInEmergencyCall = true;
            phone.mDataConnection.setInternalDataEnabled(false);
            phone.mDataConnectionTracker.setInternalDataEnabled(false);
        }
    }

@@ -1079,7 +1079,7 @@ public final class CdmaCallTracker extends CallTracker {
            }
            if (inEcm.compareTo("false") == 0) {
                // Re-initiate data connection
                phone.mDataConnection.setInternalDataEnabled(true);
                phone.mDataConnectionTracker.setInternalDataEnabled(true);
            }
        }
    }
+11 −11
Original line number Diff line number Diff line
@@ -286,23 +286,23 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {

        // TODO: 4G Tech Handoff
        // if (has4gHandoff) {
        // Message msg = phone.mDataConnection.obtainMessage(
        // Message msg = phone.mDataConnectionTracker.obtainMessage(
        // DataConnectionTracker.EVENT_4G_TECHNOLOGY_CHANGE);
        // phone.mDataConnection.sendMessage(msg);
        // phone.mDataConnectionTracker.sendMessage(msg);
        // }

        if ((hasMultiApnSupport)
                && (phone.mDataConnection instanceof CdmaDataConnectionTracker)) {
            if (DBG) log("pollStateDone: dispose of current DCT create new GsmDCT");
            phone.mDataConnection.dispose();
            phone.mDataConnection = new GsmDataConnectionTracker(mCdmaLtePhone);
                && (phone.mDataConnectionTracker instanceof CdmaDataConnectionTracker)) {
            if (DBG) log("GsmDataConnectionTracker Created");
            phone.mDataConnectionTracker.dispose();
            phone.mDataConnectionTracker = new GsmDataConnectionTracker(mCdmaLtePhone);
        }

        if ((hasLostMultiApnSupport)
                && (phone.mDataConnection instanceof GsmDataConnectionTracker)) {
            if (DBG) log("pollStateDone: dispose of current DCT create new CdmaDCT");
            phone.mDataConnection.dispose();
            phone.mDataConnection = new CdmaDataConnectionTracker((CDMAPhone)phone);
                && (phone.mDataConnectionTracker instanceof GsmDataConnectionTracker)) {
            if (DBG)log("GsmDataConnectionTracker disposed");
            phone.mDataConnectionTracker.dispose();
            phone.mDataConnectionTracker = new CdmaDataConnectionTracker((CDMAPhone)phone);
        }

        CdmaCellLocation tcl = cellLoc;
@@ -387,7 +387,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
        }

        if ((hasCdmaDataConnectionChanged || hasNetworkTypeChanged)
                && (phone.mDataConnection instanceof CdmaDataConnectionTracker)) {
                && (phone.mDataConnectionTracker instanceof CdmaDataConnectionTracker)) {
            phone.notifyDataConnection();
        }

Loading