/**
* Set network info related to the connected cell: MCC, MNC, LAC, CellId
*/
public void setNetworkInfo() {
if (DBG)
Log.d(Config.TAG, TAG + "setNetworkInfo called");
String temp = mTelMgr.getNetworkOperator();
if ((temp != null) && (temp.length() >= 5)) {
mMcc = temp.substring(0, 3);
mMnc = temp.substring(3);
}
CellLocation oCell = mTelMgr.getCellLocation();
if (oCell instanceof GsmCellLocation) {
mLac = String.valueOf(((GsmCellLocation) oCell).getLac());
mCellId = String.valueOf(((GsmCellLocation) oCell).getCid());
mPsc = String.valueOf(((GsmCellLocation) oCell).getPsc());
}
if (oCell instanceof CdmaCellLocation) {
String t = null;
// (CdmaCellLocation) oCell
t = "Base station id : "
+ ((CdmaCellLocation) oCell).getBaseStationId()
+ "base station latitude "
+ ((CdmaCellLocation) oCell).getBaseStationLatitude()
+ " base station longitude"
+ ((CdmaCellLocation) oCell).getBaseStationLongitude()
+ " network id" + ((CdmaCellLocation) oCell).getNetworkId()
+ " system id " + ((CdmaCellLocation) oCell).getSystemId();
Log.d(Config.TAG, TAG + t);
}
}
PhoneStateHelper.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:SignalAnalysis
作者:
评论列表
文章目录