Remove getCurrentDataConnectionList.

I'll add another mechanism which will probably use an
asynchronous interface with the DataConnectionTracker.

Change-Id: I71f80bb9fe0496c42ff9b1ddbf4e36a68d3f1592
This commit is contained in:
Wink Saville
2011-04-20 10:24:36 -07:00
parent 20a44118dd
commit 2c3ec09261

View File

@@ -755,41 +755,41 @@ public class RadioInfo extends Activity {
private final void updatePdpList() { private final void updatePdpList() {
StringBuilder sb = new StringBuilder("========DATA=======\n"); StringBuilder sb = new StringBuilder("========DATA=======\n");
List<DataConnection> dcs = phone.getCurrentDataConnectionList(); // List<DataConnection> dcs = phone.getCurrentDataConnectionList();
//
for (DataConnection dc : dcs) { // for (DataConnection dc : dcs) {
sb.append(" State=").append(dc.getStateAsString()).append("\n"); // sb.append(" State=").append(dc.getStateAsString()).append("\n");
if (dc.isActive()) { // if (dc.isActive()) {
long timeElapsed = // long timeElapsed =
(System.currentTimeMillis() - dc.getConnectionTime())/1000; // (System.currentTimeMillis() - dc.getConnectionTime())/1000;
sb.append(" connected at ") // sb.append(" connected at ")
.append(DateUtils.timeString(dc.getConnectionTime())) // .append(DateUtils.timeString(dc.getConnectionTime()))
.append(" and elapsed ") // .append(" and elapsed ")
.append(DateUtils.formatElapsedTime(timeElapsed)); // .append(DateUtils.formatElapsedTime(timeElapsed));
//
if (dc instanceof GsmDataConnection) { // if (dc instanceof GsmDataConnection) {
GsmDataConnection pdp = (GsmDataConnection)dc; // GsmDataConnection pdp = (GsmDataConnection)dc;
sb.append("\n to ") // sb.append("\n to ")
.append(pdp.getApn().toString()); // .append(pdp.getApn().toString());
} // }
sb.append("\nLinkProperties: "); // sb.append("\nLinkProperties: ");
sb.append(phone.getLinkProperties(phone.getActiveApnTypes()[0]).toString()); // sb.append(phone.getLinkProperties(phone.getActiveApnTypes()[0]).toString());
} else if (dc.isInactive()) { // } else if (dc.isInactive()) {
sb.append(" disconnected with last try at ") // sb.append(" disconnected with last try at ")
.append(DateUtils.timeString(dc.getLastFailTime())) // .append(DateUtils.timeString(dc.getLastFailTime()))
.append("\n fail because ") // .append("\n fail because ")
.append(dc.getLastFailCause().toString()); // .append(dc.getLastFailCause().toString());
} else { // } else {
if (dc instanceof GsmDataConnection) { // if (dc instanceof GsmDataConnection) {
GsmDataConnection pdp = (GsmDataConnection)dc; // GsmDataConnection pdp = (GsmDataConnection)dc;
sb.append(" is connecting to ") // sb.append(" is connecting to ")
.append(pdp.getApn().toString()); // .append(pdp.getApn().toString());
} else { // } else {
sb.append(" is connecting"); // sb.append(" is connecting");
} // }
} // }
sb.append("\n==================="); // sb.append("\n===================");
} // }
disconnects.setText(sb.toString()); disconnects.setText(sb.toString());
} }