Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +0 −6 Original line number Diff line number Diff line Loading @@ -508,12 +508,6 @@ public class GsmCdmaPhone extends Phone { // Emergency APN is available even in Out Of Service // Pass the actual State of EPDN ret = PhoneConstants.DataState.DISCONNECTED; } else if (mDcTracker.isApnTypeEnabled(apnType) == false || (!isPhoneTypeCdmaLte() && mDcTracker.isApnTypeActive(apnType) == false)) { //TODO: isApnTypeActive() is just checking whether ApnContext holds // Dataconnection or not. Checking each ApnState below should // provide the same state. Calling isApnTypeActive() can be removed. ret = PhoneConstants.DataState.DISCONNECTED; } else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */ switch (mDcTracker.getState(apnType)) { Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +0 −19 Original line number Diff line number Diff line Loading @@ -1086,13 +1086,6 @@ public class DcTracker extends Handler { } } public boolean isApnTypeActive(String type) { ApnContext apnContext = mApnContexts.get(type); if (apnContext == null) return false; return (apnContext.getDcAc() != null); } public boolean isDataPossible(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); if (apnContext == null) { Loading Loading @@ -1243,18 +1236,6 @@ public class DcTracker extends Handler { return null; } public boolean isApnTypeEnabled(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); if (apnContext == null) { return false; } return apnContext.isEnabled(); } private void setState(DctConstants.State s) { if (DBG) log("setState should not be used in GSM" + s); } // Return state of specific apn type public DctConstants.State getState(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); Loading tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -222,14 +222,14 @@ public class GsmCdmaPhoneTest extends TelephonyTest { PhoneConstants.APN_TYPE_ALL)); // 2. GSM, getCurrentDataConnectionState != STATE_IN_SERVICE, apn = APN_TYPE_EMERGENCY, apn // not enabled and not active // not connected doReturn(DctConstants.State.IDLE).when(mDcTracker).getState( PhoneConstants.APN_TYPE_EMERGENCY); assertEquals(PhoneConstants.DataState.DISCONNECTED, mPhoneUT.getDataConnectionState( PhoneConstants.APN_TYPE_EMERGENCY)); // 3. GSM, getCurrentDataConnectionState != STATE_IN_SERVICE, apn = APN_TYPE_EMERGENCY, // APN enabled, active and CONNECTED, callTracker state = idle doReturn(true).when(mDcTracker).isApnTypeEnabled(PhoneConstants.APN_TYPE_EMERGENCY); doReturn(true).when(mDcTracker).isApnTypeActive(PhoneConstants.APN_TYPE_EMERGENCY); // APN is connected, callTracker state = idle doReturn(DctConstants.State.CONNECTED).when(mDcTracker).getState( PhoneConstants.APN_TYPE_EMERGENCY); mCT.mState = PhoneConstants.State.IDLE; Loading tests/telephonytests/src/com/android/internal/telephony/mocks/DcTrackerMock.java +0 −8 Original line number Diff line number Diff line Loading @@ -62,10 +62,6 @@ public class DcTrackerMock extends DcTracker { throw new RuntimeException("Not Implemented"); } @Override public boolean isApnTypeActive(String type) { throw new RuntimeException("Not Implemented"); } @Override public boolean isDataPossible(String apnType) { throw new RuntimeException("Not Implemented"); } Loading @@ -86,10 +82,6 @@ public class DcTrackerMock extends DcTracker { throw new RuntimeException("Not Implemented"); } @Override public boolean isApnTypeEnabled(String apnType) { throw new RuntimeException("Not Implemented"); } @Override public DctConstants.State getState(String apnType) { throw new RuntimeException("Not Implemented"); } Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +0 −6 Original line number Diff line number Diff line Loading @@ -508,12 +508,6 @@ public class GsmCdmaPhone extends Phone { // Emergency APN is available even in Out Of Service // Pass the actual State of EPDN ret = PhoneConstants.DataState.DISCONNECTED; } else if (mDcTracker.isApnTypeEnabled(apnType) == false || (!isPhoneTypeCdmaLte() && mDcTracker.isApnTypeActive(apnType) == false)) { //TODO: isApnTypeActive() is just checking whether ApnContext holds // Dataconnection or not. Checking each ApnState below should // provide the same state. Calling isApnTypeActive() can be removed. ret = PhoneConstants.DataState.DISCONNECTED; } else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */ switch (mDcTracker.getState(apnType)) { Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +0 −19 Original line number Diff line number Diff line Loading @@ -1086,13 +1086,6 @@ public class DcTracker extends Handler { } } public boolean isApnTypeActive(String type) { ApnContext apnContext = mApnContexts.get(type); if (apnContext == null) return false; return (apnContext.getDcAc() != null); } public boolean isDataPossible(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); if (apnContext == null) { Loading Loading @@ -1243,18 +1236,6 @@ public class DcTracker extends Handler { return null; } public boolean isApnTypeEnabled(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); if (apnContext == null) { return false; } return apnContext.isEnabled(); } private void setState(DctConstants.State s) { if (DBG) log("setState should not be used in GSM" + s); } // Return state of specific apn type public DctConstants.State getState(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); Loading
tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -222,14 +222,14 @@ public class GsmCdmaPhoneTest extends TelephonyTest { PhoneConstants.APN_TYPE_ALL)); // 2. GSM, getCurrentDataConnectionState != STATE_IN_SERVICE, apn = APN_TYPE_EMERGENCY, apn // not enabled and not active // not connected doReturn(DctConstants.State.IDLE).when(mDcTracker).getState( PhoneConstants.APN_TYPE_EMERGENCY); assertEquals(PhoneConstants.DataState.DISCONNECTED, mPhoneUT.getDataConnectionState( PhoneConstants.APN_TYPE_EMERGENCY)); // 3. GSM, getCurrentDataConnectionState != STATE_IN_SERVICE, apn = APN_TYPE_EMERGENCY, // APN enabled, active and CONNECTED, callTracker state = idle doReturn(true).when(mDcTracker).isApnTypeEnabled(PhoneConstants.APN_TYPE_EMERGENCY); doReturn(true).when(mDcTracker).isApnTypeActive(PhoneConstants.APN_TYPE_EMERGENCY); // APN is connected, callTracker state = idle doReturn(DctConstants.State.CONNECTED).when(mDcTracker).getState( PhoneConstants.APN_TYPE_EMERGENCY); mCT.mState = PhoneConstants.State.IDLE; Loading
tests/telephonytests/src/com/android/internal/telephony/mocks/DcTrackerMock.java +0 −8 Original line number Diff line number Diff line Loading @@ -62,10 +62,6 @@ public class DcTrackerMock extends DcTracker { throw new RuntimeException("Not Implemented"); } @Override public boolean isApnTypeActive(String type) { throw new RuntimeException("Not Implemented"); } @Override public boolean isDataPossible(String apnType) { throw new RuntimeException("Not Implemented"); } Loading @@ -86,10 +82,6 @@ public class DcTrackerMock extends DcTracker { throw new RuntimeException("Not Implemented"); } @Override public boolean isApnTypeEnabled(String apnType) { throw new RuntimeException("Not Implemented"); } @Override public DctConstants.State getState(String apnType) { throw new RuntimeException("Not Implemented"); } Loading