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
This commit is contained in:
Robert Greenwalt
2011-04-08 10:17:39 -07:00
parent 5203a5bc28
commit 63edf6c4f5
8 changed files with 52 additions and 52 deletions

View File

@@ -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);
}

View File

@@ -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) {

View File

@@ -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);
}
}

View File

@@ -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);
}
}
}

View File

@@ -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();
}

View File

@@ -502,7 +502,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
&& cm.getRadioState() == CommandsInterface.RadioState.RADIO_OFF) {
cm.setRadioPower(true, null);
} else if (!mDesiredPowerState && cm.getRadioState().isOn()) {
DataConnectionTracker dcTracker = phone.mDataConnection;
DataConnectionTracker dcTracker = phone.mDataConnectionTracker;
// If it's on and available and we want it off gracefully
powerOffRadioSafely(dcTracker);

View File

@@ -143,7 +143,7 @@ public class GSMPhone extends PhoneBase {
mSMS = new GsmSMSDispatcher(this);
mIccFileHandler = new SIMFileHandler(this);
mSIMRecords = new SIMRecords(this);
mDataConnection = new GsmDataConnectionTracker (this);
mDataConnectionTracker = new GsmDataConnectionTracker (this);
mSimCard = new SimCard(this);
if (!unitTestMode) {
mSimPhoneBookIntManager = new SimPhoneBookInterfaceManager(this);
@@ -218,7 +218,7 @@ public class GSMPhone extends PhoneBase {
//Force all referenced classes to unregister their former registered events
mStkService.dispose();
mCT.dispose();
mDataConnection.dispose();
mDataConnectionTracker.dispose();
mSST.dispose();
mIccFileHandler.dispose(); // instance of SimFileHandler
mSIMRecords.dispose();
@@ -239,7 +239,7 @@ public class GSMPhone extends PhoneBase {
this.mSIMRecords = null;
this.mIccFileHandler = null;
this.mSimCard = null;
this.mDataConnection = null;
this.mDataConnectionTracker = null;
this.mCT = null;
this.mSST = null;
}
@@ -308,11 +308,11 @@ public class GSMPhone 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 { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */
switch (mDataConnection.getState(apnType)) {
switch (mDataConnectionTracker.getState(apnType)) {
case FAILED:
case IDLE:
ret = DataState.DISCONNECTED;
@@ -343,7 +343,7 @@ public class GSMPhone extends PhoneBase {
DataActivityState ret = DataActivityState.NONE;
if (mSST.getCurrentGprsState() == ServiceState.STATE_IN_SERVICE) {
switch (mDataConnection.getActivity()) {
switch (mDataConnectionTracker.getActivity()) {
case DATAIN:
ret = DataActivityState.DATAIN;
break;
@@ -1070,7 +1070,7 @@ public class GSMPhone extends PhoneBase {
}
public List<DataConnection> getCurrentDataConnectionList () {
return mDataConnection.getAllDataConnections();
return mDataConnectionTracker.getAllDataConnections();
}
public void updateServiceLocation() {
@@ -1086,11 +1086,11 @@ public class GSMPhone extends PhoneBase {
}
public boolean getDataRoamingEnabled() {
return mDataConnection.getDataOnRoamingEnabled();
return mDataConnectionTracker.getDataOnRoamingEnabled();
}
public void setDataRoamingEnabled(boolean enable) {
mDataConnection.setDataOnRoamingEnabled(enable);
mDataConnectionTracker.setDataOnRoamingEnabled(enable);
}
/**

View File

@@ -469,7 +469,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
cm.setRadioPower(true, null);
} else if (!mDesiredPowerState && cm.getRadioState().isOn()) {
// If it's on and available and we want it off gracefully
DataConnectionTracker dcTracker = phone.mDataConnection;
DataConnectionTracker dcTracker = phone.mDataConnectionTracker;
powerOffRadioSafely(dcTracker);
} // Otherwise, we're in the desired state
}