Rename PdpConnection to GsmDataConnection
Change-Id: Ibad792b858fd1f7abd6903b71cddcf7c58cd7ecc
This commit is contained in:
@@ -59,7 +59,7 @@ import com.android.internal.telephony.Phone;
|
|||||||
import com.android.internal.telephony.PhoneFactory;
|
import com.android.internal.telephony.PhoneFactory;
|
||||||
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
||||||
import com.android.internal.telephony.TelephonyProperties;
|
import com.android.internal.telephony.TelephonyProperties;
|
||||||
import com.android.internal.telephony.gsm.PdpConnection;
|
import com.android.internal.telephony.gsm.GsmDataConnection;
|
||||||
|
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
@@ -760,8 +760,8 @@ public class RadioInfo extends Activity {
|
|||||||
List<DataConnection> dcs = phone.getCurrentDataConnectionList();
|
List<DataConnection> dcs = phone.getCurrentDataConnectionList();
|
||||||
|
|
||||||
for (DataConnection dc : dcs) {
|
for (DataConnection dc : dcs) {
|
||||||
sb.append(" State: ").append(dc.getState().toString()).append("\n");
|
sb.append(" State: ").append(dc.getStateAsString()).append("\n");
|
||||||
if (dc.getState().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 ")
|
||||||
@@ -769,8 +769,8 @@ public class RadioInfo extends Activity {
|
|||||||
.append(" and elapsed ")
|
.append(" and elapsed ")
|
||||||
.append(DateUtils.formatElapsedTime(timeElapsed));
|
.append(DateUtils.formatElapsedTime(timeElapsed));
|
||||||
|
|
||||||
if (dc instanceof PdpConnection) {
|
if (dc instanceof GsmDataConnection) {
|
||||||
PdpConnection pdp = (PdpConnection)dc;
|
GsmDataConnection pdp = (GsmDataConnection)dc;
|
||||||
sb.append("\n to ")
|
sb.append("\n to ")
|
||||||
.append(pdp.getApn().toString());
|
.append(pdp.getApn().toString());
|
||||||
}
|
}
|
||||||
@@ -784,14 +784,14 @@ public class RadioInfo extends Activity {
|
|||||||
if (dns != null) {
|
if (dns != null) {
|
||||||
sb.append("\ndns: ").append(dns[0]).append(", ").append(dns[1]);
|
sb.append("\ndns: ").append(dns[0]).append(", ").append(dns[1]);
|
||||||
}
|
}
|
||||||
} else if (dc.getState().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 PdpConnection) {
|
if (dc instanceof GsmDataConnection) {
|
||||||
PdpConnection pdp = (PdpConnection)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 {
|
||||||
|
Reference in New Issue
Block a user