summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/RadioInfo.java
diff options
context:
space:
mode:
authorjsh <jsh@google.com>2009-09-24 09:19:22 -0700
committerjsh <jsh@google.com>2009-09-27 12:26:11 -0700
commit534f5ae34ee8fa76ed1cecb34c1d7898892f14f8 (patch)
tree77b2e70da6da5cc2c758ec3688be8bc07397093a /src/com/android/settings/RadioInfo.java
parenta40fb23734cc5d5ac6e69a060cbb488269ad8af3 (diff)
downloadpackages_apps_Settings-534f5ae34ee8fa76ed1cecb34c1d7898892f14f8.zip
packages_apps_Settings-534f5ae34ee8fa76ed1cecb34c1d7898892f14f8.tar.gz
packages_apps_Settings-534f5ae34ee8fa76ed1cecb34c1d7898892f14f8.tar.bz2
Display cell location for CDMA in Phone info screen.
Useful for debugging location issues. b/2134743
Diffstat (limited to 'src/com/android/settings/RadioInfo.java')
-rw-r--r--src/com/android/settings/RadioInfo.java42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index 4665471..ce236fd 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -37,6 +37,7 @@ import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.telephony.NeighboringCellInfo;
+import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
import android.text.format.DateUtils;
import android.util.Log;
@@ -621,21 +622,42 @@ public class RadioInfo extends Activity {
}
private final void updateLocation(CellLocation location) {
- int lac = -1;
- int cid = -1;
+ Resources r = getResources();
if (location instanceof GsmCellLocation) {
GsmCellLocation loc = (GsmCellLocation)location;
- lac = loc.getLac();
- cid = loc.getCid();
+ int lac = loc.getLac();
+ int cid = loc.getCid();
+ mLocation.setText(r.getString(R.string.radioInfo_lac) + " = "
+ + ((lac == -1) ? "unknown" : Integer.toHexString(lac))
+ + " "
+ + r.getString(R.string.radioInfo_cid) + " = "
+ + ((cid == -1) ? "unknown" : Integer.toHexString(cid)));
+ } else if (location instanceof CdmaCellLocation) {
+ CdmaCellLocation loc = (CdmaCellLocation)location;
+ int bid = loc.getBaseStationId();
+ int sid = loc.getSystemId();
+ int nid = loc.getNetworkId();
+ int lat = loc.getBaseStationLatitude();
+ int lon = loc.getBaseStationLongitude();
+ mLocation.setText("BID = "
+ + ((bid == -1) ? "unknown" : Integer.toHexString(bid))
+ + " "
+ + "SID = "
+ + ((sid == -1) ? "unknown" : Integer.toHexString(sid))
+ + " "
+ + "NID = "
+ + ((nid == -1) ? "unknown" : Integer.toHexString(nid))
+ + "\n"
+ + "LAT = "
+ + ((lat == -1) ? "unknown" : Integer.toHexString(lat))
+ + " "
+ + "LONG = "
+ + ((lon == -1) ? "unknown" : Integer.toHexString(lon)));
+ } else {
+ mLocation.setText("unknown");
}
- Resources r = getResources();
- mLocation.setText(r.getString(R.string.radioInfo_lac) + " = "
- + ((lac == -1) ? "unknown" : Integer.toHexString(lac))
- + " "
- + r.getString(R.string.radioInfo_cid) + " = "
- + ((cid == -1) ? "unknown" : Integer.toHexString(cid)));
}
private final void updateNeighboringCids(ArrayList<NeighboringCellInfo> cids) {