Merge change 418 into donut

* changes:
  add additional CdmaDataConnectionTracker event logging
This commit is contained in:
Android (Google) Code Review
2009-05-25 23:34:59 -07:00
2 changed files with 24 additions and 8 deletions

View File

@@ -30,4 +30,6 @@ public final class TelephonyEventLog {
public static final int EVENT_LOG_CGREG_FAIL = 50107; public static final int EVENT_LOG_CGREG_FAIL = 50107;
public static final int EVENT_LOG_DATA_STATE_RADIO_OFF = 50108; public static final int EVENT_LOG_DATA_STATE_RADIO_OFF = 50108;
public static final int EVENT_LOG_PDP_NETWORK_DROP = 50109; public static final int EVENT_LOG_PDP_NETWORK_DROP = 50109;
public static final int EVENT_LOG_CDMA_DATA_SETUP_FAILED = 50110;
public static final int EVENT_LOG_CDMA_DATA_DROP = 50111;
} }

View File

@@ -39,6 +39,7 @@ import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException; import android.provider.Settings.SettingNotFoundException;
import android.telephony.ServiceState; import android.telephony.ServiceState;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.telephony.cdma.CdmaCellLocation;
import android.util.EventLog; import android.util.EventLog;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
@@ -55,10 +56,6 @@ import com.android.internal.telephony.TelephonyEventLog;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* WINK:TODO: In GsmDataConnectionTracker there are
* EventLog's used quite a few places maybe
* more need to be added in this file?
*
* {@hide} * {@hide}
*/ */
public final class CdmaDataConnectionTracker extends DataConnectionTracker { public final class CdmaDataConnectionTracker extends DataConnectionTracker {
@@ -578,7 +575,14 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
} }
if (sentSinceLastRecv >= NUMBER_SENT_PACKETS_OF_HANG) { if (sentSinceLastRecv >= NUMBER_SENT_PACKETS_OF_HANG) {
// we already have NUMBER_SENT_PACKETS sent without ack // Packets sent without ack exceeded threshold.
if (mNoRecvPollCount == 0) {
EventLog.writeEvent(
TelephonyEventLog.EVENT_LOG_RADIO_RESET_COUNTDOWN_TRIGGERED,
sentSinceLastRecv);
}
if (mNoRecvPollCount < NO_RECV_POLL_LIMIT) { if (mNoRecvPollCount < NO_RECV_POLL_LIMIT) {
mNoRecvPollCount++; mNoRecvPollCount++;
// Slow down the poll interval to let things happen // Slow down the poll interval to let things happen
@@ -590,6 +594,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
netStatPollEnabled = false; netStatPollEnabled = false;
stopNetStatPoll(); stopNetStatPoll();
restartRadio(); restartRadio();
EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_RADIO_RESET,
NO_RECV_POLL_LIMIT);
} }
} else { } else {
mNoRecvPollCount = 0; mNoRecvPollCount = 0;
@@ -845,6 +851,13 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
if (state == State.FAILED) { if (state == State.FAILED) {
cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED); cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED);
nextReconnectDelay = RECONNECT_DELAY_INITIAL_MILLIS; nextReconnectDelay = RECONNECT_DELAY_INITIAL_MILLIS;
CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
int bsid = (loc != null) ? loc.getBaseStationId() : -1;
EventLog.List val = new EventLog.List(bsid,
TelephonyManager.getDefault().getNetworkType());
EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_SETUP_FAILED, val);
} }
trySetupData(Phone.REASON_CDMA_DATA_DETACHED); trySetupData(Phone.REASON_CDMA_DATA_DETACHED);
} }
@@ -870,10 +883,11 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
} }
} else { } else {
int cid = -1; CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
EventLog.List val = new EventLog.List(cid, int bsid = (loc != null) ? loc.getBaseStationId() : -1;
EventLog.List val = new EventLog.List(bsid,
TelephonyManager.getDefault().getNetworkType()); TelephonyManager.getDefault().getNetworkType());
EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val); EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_DROP, val);
cleanUpConnection(true, null); cleanUpConnection(true, null);
} }