Loading telephony/java/com/android/internal/telephony/DataConnectionTracker.java +2 −7 Original line number Diff line number Diff line Loading @@ -509,7 +509,6 @@ public abstract class DataConnectionTracker extends Handler { protected abstract void onVoiceCallEnded(); protected abstract void onCleanUpConnection(boolean tearDown, int apnId, String reason); protected abstract void onCleanUpAllConnections(String cause); protected abstract boolean isDataPossible(); protected abstract boolean isDataPossible(String apnType); @Override Loading Loading @@ -752,7 +751,7 @@ public abstract class DataConnectionTracker extends Handler { protected void notifyDataAvailability(String reason) { // note that we either just turned all off because we lost availability // or all were off and could now go on, so only have off apns to worry about notifyOffApnsOfAvailability(reason, isDataPossible()); notifyOffApnsOfAvailability(reason, isDataPossible(Phone.APN_TYPE_DEFAULT)); } public boolean isApnTypeEnabled(String apnType) { Loading Loading @@ -968,11 +967,7 @@ public abstract class DataConnectionTracker extends Handler { sendMessage(msg); } public boolean isAnyActiveDataConnections() { // TODO: Remember if there are any connected or // loop asking each DC/APN? return true; } public abstract boolean isAnyActiveDataConnections(); protected void onSetDataEnabled(boolean enable) { boolean prevEnabled = getAnyDataEnabled(); Loading telephony/java/com/android/internal/telephony/PhoneBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -1023,7 +1023,7 @@ public abstract class PhoneBase extends Handler implements Phone { } public boolean isDataConnectivityPossible() { return ((mDataConnectionTracker != null) && (mDataConnectionTracker.isDataPossible())); return isDataConnectivityPossible(Phone.APN_TYPE_DEFAULT); } public boolean isDataConnectivityPossible(String apnType) { Loading telephony/java/com/android/internal/telephony/PhoneProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -654,7 +654,7 @@ public class PhoneProxy extends Handler implements Phone { } public boolean isDataConnectivityPossible() { return mActivePhone.isDataConnectivityPossible(); return mActivePhone.isDataConnectivityPossible(Phone.APN_TYPE_DEFAULT); } public boolean isDataConnectivityPossible(String apnType) { Loading telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +5 −25 Original line number Diff line number Diff line Loading @@ -214,36 +214,16 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { return allowed; } /** * The only circumstances under which we report that data connectivity is not * possible are * <ul> * <li>Data is disallowed (roaming, power state, voice call, etc).</li> * <li>The current data state is {@code DISCONNECTED} for a reason other than * having explicitly disabled connectivity. In other words, data is not available * because the phone is out of coverage or some like reason.</li> * </ul> * @return {@code true} if data connectivity is possible, {@code false} otherwise. */ @Override protected boolean isDataPossible() { boolean dataAllowed = isDataAllowed(); boolean anyDataEnabled = getAnyDataEnabled(); boolean possible = (dataAllowed && !(anyDataEnabled && (mState == State.FAILED || mState == State.IDLE))); if (!possible && DBG) { log("isDataPossible() " + possible + ", dataAllowed=" + dataAllowed + " anyDataEnabled=" + anyDataEnabled + " dataState=" + mState); protected boolean isDataPossible(String apnType) { boolean possible = isDataAllowed() && !(getAnyDataEnabled() && (mState == State.FAILED || mState == State.IDLE)); if (!possible && DBG && isDataAllowed()) { log("Data not possible. No coverage: dataState = " + mState); } return possible; } @Override protected boolean isDataPossible(String apnType) { return isDataPossible(); } private boolean trySetupData(String reason) { if (DBG) log("***trySetupData due to " + (reason == null ? "(unspecified)" : reason)); Loading telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +0 −22 Original line number Diff line number Diff line Loading @@ -205,28 +205,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { return (apnContext.getDataConnection() != null); } /** * The only circumstances under which we report that data connectivity is not * possible are * <ul> * <li>Data is disallowed (roaming, power state, voice call, etc).</li> * <li>The current data state is {@code DISCONNECTED} for a reason other than * having explicitly disabled connectivity. In other words, data is not available * because the phone is out of coverage or some like reason.</li> * </ul> * @return {@code true} if data connectivity is possible, {@code false} otherwise. * TODO - do per-apn notifications of availability using dependencyMet values. */ @Override protected boolean isDataPossible() { boolean possible = (isDataAllowed() && !(getAnyDataEnabled() && (getOverallState() == State.FAILED))); if (!possible && DBG && isDataAllowed()) { if (DBG) log("Data not possible. No coverage: dataState = " + getOverallState()); } return possible; } @Override protected boolean isDataPossible(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); Loading Loading
telephony/java/com/android/internal/telephony/DataConnectionTracker.java +2 −7 Original line number Diff line number Diff line Loading @@ -509,7 +509,6 @@ public abstract class DataConnectionTracker extends Handler { protected abstract void onVoiceCallEnded(); protected abstract void onCleanUpConnection(boolean tearDown, int apnId, String reason); protected abstract void onCleanUpAllConnections(String cause); protected abstract boolean isDataPossible(); protected abstract boolean isDataPossible(String apnType); @Override Loading Loading @@ -752,7 +751,7 @@ public abstract class DataConnectionTracker extends Handler { protected void notifyDataAvailability(String reason) { // note that we either just turned all off because we lost availability // or all were off and could now go on, so only have off apns to worry about notifyOffApnsOfAvailability(reason, isDataPossible()); notifyOffApnsOfAvailability(reason, isDataPossible(Phone.APN_TYPE_DEFAULT)); } public boolean isApnTypeEnabled(String apnType) { Loading Loading @@ -968,11 +967,7 @@ public abstract class DataConnectionTracker extends Handler { sendMessage(msg); } public boolean isAnyActiveDataConnections() { // TODO: Remember if there are any connected or // loop asking each DC/APN? return true; } public abstract boolean isAnyActiveDataConnections(); protected void onSetDataEnabled(boolean enable) { boolean prevEnabled = getAnyDataEnabled(); Loading
telephony/java/com/android/internal/telephony/PhoneBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -1023,7 +1023,7 @@ public abstract class PhoneBase extends Handler implements Phone { } public boolean isDataConnectivityPossible() { return ((mDataConnectionTracker != null) && (mDataConnectionTracker.isDataPossible())); return isDataConnectivityPossible(Phone.APN_TYPE_DEFAULT); } public boolean isDataConnectivityPossible(String apnType) { Loading
telephony/java/com/android/internal/telephony/PhoneProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -654,7 +654,7 @@ public class PhoneProxy extends Handler implements Phone { } public boolean isDataConnectivityPossible() { return mActivePhone.isDataConnectivityPossible(); return mActivePhone.isDataConnectivityPossible(Phone.APN_TYPE_DEFAULT); } public boolean isDataConnectivityPossible(String apnType) { Loading
telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +5 −25 Original line number Diff line number Diff line Loading @@ -214,36 +214,16 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { return allowed; } /** * The only circumstances under which we report that data connectivity is not * possible are * <ul> * <li>Data is disallowed (roaming, power state, voice call, etc).</li> * <li>The current data state is {@code DISCONNECTED} for a reason other than * having explicitly disabled connectivity. In other words, data is not available * because the phone is out of coverage or some like reason.</li> * </ul> * @return {@code true} if data connectivity is possible, {@code false} otherwise. */ @Override protected boolean isDataPossible() { boolean dataAllowed = isDataAllowed(); boolean anyDataEnabled = getAnyDataEnabled(); boolean possible = (dataAllowed && !(anyDataEnabled && (mState == State.FAILED || mState == State.IDLE))); if (!possible && DBG) { log("isDataPossible() " + possible + ", dataAllowed=" + dataAllowed + " anyDataEnabled=" + anyDataEnabled + " dataState=" + mState); protected boolean isDataPossible(String apnType) { boolean possible = isDataAllowed() && !(getAnyDataEnabled() && (mState == State.FAILED || mState == State.IDLE)); if (!possible && DBG && isDataAllowed()) { log("Data not possible. No coverage: dataState = " + mState); } return possible; } @Override protected boolean isDataPossible(String apnType) { return isDataPossible(); } private boolean trySetupData(String reason) { if (DBG) log("***trySetupData due to " + (reason == null ? "(unspecified)" : reason)); Loading
telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +0 −22 Original line number Diff line number Diff line Loading @@ -205,28 +205,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { return (apnContext.getDataConnection() != null); } /** * The only circumstances under which we report that data connectivity is not * possible are * <ul> * <li>Data is disallowed (roaming, power state, voice call, etc).</li> * <li>The current data state is {@code DISCONNECTED} for a reason other than * having explicitly disabled connectivity. In other words, data is not available * because the phone is out of coverage or some like reason.</li> * </ul> * @return {@code true} if data connectivity is possible, {@code false} otherwise. * TODO - do per-apn notifications of availability using dependencyMet values. */ @Override protected boolean isDataPossible() { boolean possible = (isDataAllowed() && !(getAnyDataEnabled() && (getOverallState() == State.FAILED))); if (!possible && DBG && isDataAllowed()) { if (DBG) log("Data not possible. No coverage: dataState = " + getOverallState()); } return possible; } @Override protected boolean isDataPossible(String apnType) { ApnContext apnContext = mApnContexts.get(apnType); Loading