Loading src/java/com/android/internal/telephony/DataConnectionTracker.java +7 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,13 @@ public abstract class DataConnectionTracker extends Handler { protected static final boolean DBG = true; protected static final boolean VDBG = false; /** * Constants for the data connection activity: * physical link down/up */ protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE = 0; protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_DOWN = 1; protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_UP = 2; /** Delay between APN attempts. Note the property override mechanism is there just for testing purpose only. */ Loading src/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +0 −8 Original line number Diff line number Diff line Loading @@ -80,14 +80,6 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { "com.android.internal.telephony.cdma-data-stall"; /** * Constants for the data connection activity: * physical link down/up */ private static final int DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE = 0; private static final int DATA_CONNECTION_ACTIVE_PH_LINK_DOWN = 1; private static final int DATA_CONNECTION_ACTIVE_PH_LINK_UP = 2; private static final String[] mSupportedApnTypes = { PhoneConstants.APN_TYPE_DEFAULT, PhoneConstants.APN_TYPE_MMS, Loading src/java/com/android/internal/telephony/gsm/GSMPhone.java +4 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,10 @@ public class GSMPhone extends PhoneBase { case DATAINANDOUT: ret = DataActivityState.DATAINANDOUT; break; case DORMANT: ret = DataActivityState.DORMANT; break; } } Loading src/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +30 −1 Original line number Diff line number Diff line Loading @@ -1219,6 +1219,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } if (DBG) log("onDataStateChanged(ar): DataCallState size=" + dataCallStates.size()); boolean isAnyDataCallDormant = false; boolean isAnyDataCallActive = false; // Create a hash map to store the dataCallState of each DataConnectionAc HashMap<DataCallState, DataConnectionAc> dataCallStateToDcac; dataCallStateToDcac = new HashMap<DataCallState, DataConnectionAc>(); Loading @@ -1240,6 +1243,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { continue; } if (newState.active == DATA_CONNECTION_ACTIVE_PH_LINK_UP) isAnyDataCallActive = true; if (newState.active == DATA_CONNECTION_ACTIVE_PH_LINK_DOWN) isAnyDataCallDormant = true; // The list of apn's associated with this DataConnection Collection<ApnContext> apns = dcac.getApnListSync(); Loading Loading @@ -1325,6 +1331,28 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } } if (isAnyDataCallDormant && !isAnyDataCallActive) { // There is no way to indicate link activity per APN right now. So // Link Activity will be considered dormant only when all data calls // are dormant. // If a single data call is in dormant state and none of the data // calls are active broadcast overall link state as dormant. mActivity = DctConstants.Activity.DORMANT; if (DBG) { log("onDataStateChanged: Data Activity updated to DORMANT. stopNetStatePoll"); } stopNetStatPoll(); } else { mActivity = DctConstants.Activity.NONE; if (DBG) { log("onDataStateChanged: Data Activity updated to NONE. " + "isAnyDataCallActive = " + isAnyDataCallActive + " isAnyDataCallDormant = " + isAnyDataCallDormant); } if (isAnyDataCallActive) startNetStatPoll(); } mPhone.notifyDataActivity(); if (apnsToCleanup.size() != 0) { // Add an event log when the network drops PDP int cid = getCellLocationId(); Loading Loading @@ -1560,7 +1588,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } else if (sent == 0 && received > 0) { newActivity = DctConstants.Activity.DATAIN; } else { newActivity = DctConstants.Activity.NONE; newActivity = (mActivity == DctConstants.Activity.DORMANT) ? mActivity : DctConstants.Activity.NONE; } if (mActivity != newActivity && mIsScreenOn) { Loading Loading
src/java/com/android/internal/telephony/DataConnectionTracker.java +7 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,13 @@ public abstract class DataConnectionTracker extends Handler { protected static final boolean DBG = true; protected static final boolean VDBG = false; /** * Constants for the data connection activity: * physical link down/up */ protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE = 0; protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_DOWN = 1; protected static final int DATA_CONNECTION_ACTIVE_PH_LINK_UP = 2; /** Delay between APN attempts. Note the property override mechanism is there just for testing purpose only. */ Loading
src/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +0 −8 Original line number Diff line number Diff line Loading @@ -80,14 +80,6 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { "com.android.internal.telephony.cdma-data-stall"; /** * Constants for the data connection activity: * physical link down/up */ private static final int DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE = 0; private static final int DATA_CONNECTION_ACTIVE_PH_LINK_DOWN = 1; private static final int DATA_CONNECTION_ACTIVE_PH_LINK_UP = 2; private static final String[] mSupportedApnTypes = { PhoneConstants.APN_TYPE_DEFAULT, PhoneConstants.APN_TYPE_MMS, Loading
src/java/com/android/internal/telephony/gsm/GSMPhone.java +4 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,10 @@ public class GSMPhone extends PhoneBase { case DATAINANDOUT: ret = DataActivityState.DATAINANDOUT; break; case DORMANT: ret = DataActivityState.DORMANT; break; } } Loading
src/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +30 −1 Original line number Diff line number Diff line Loading @@ -1219,6 +1219,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } if (DBG) log("onDataStateChanged(ar): DataCallState size=" + dataCallStates.size()); boolean isAnyDataCallDormant = false; boolean isAnyDataCallActive = false; // Create a hash map to store the dataCallState of each DataConnectionAc HashMap<DataCallState, DataConnectionAc> dataCallStateToDcac; dataCallStateToDcac = new HashMap<DataCallState, DataConnectionAc>(); Loading @@ -1240,6 +1243,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { continue; } if (newState.active == DATA_CONNECTION_ACTIVE_PH_LINK_UP) isAnyDataCallActive = true; if (newState.active == DATA_CONNECTION_ACTIVE_PH_LINK_DOWN) isAnyDataCallDormant = true; // The list of apn's associated with this DataConnection Collection<ApnContext> apns = dcac.getApnListSync(); Loading Loading @@ -1325,6 +1331,28 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } } if (isAnyDataCallDormant && !isAnyDataCallActive) { // There is no way to indicate link activity per APN right now. So // Link Activity will be considered dormant only when all data calls // are dormant. // If a single data call is in dormant state and none of the data // calls are active broadcast overall link state as dormant. mActivity = DctConstants.Activity.DORMANT; if (DBG) { log("onDataStateChanged: Data Activity updated to DORMANT. stopNetStatePoll"); } stopNetStatPoll(); } else { mActivity = DctConstants.Activity.NONE; if (DBG) { log("onDataStateChanged: Data Activity updated to NONE. " + "isAnyDataCallActive = " + isAnyDataCallActive + " isAnyDataCallDormant = " + isAnyDataCallDormant); } if (isAnyDataCallActive) startNetStatPoll(); } mPhone.notifyDataActivity(); if (apnsToCleanup.size() != 0) { // Add an event log when the network drops PDP int cid = getCellLocationId(); Loading Loading @@ -1560,7 +1588,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { } else if (sent == 0 && received > 0) { newActivity = DctConstants.Activity.DATAIN; } else { newActivity = DctConstants.Activity.NONE; newActivity = (mActivity == DctConstants.Activity.DORMANT) ? mActivity : DctConstants.Activity.NONE; } if (mActivity != newActivity && mIsScreenOn) { Loading