private void checkCDMACellSID (CellLocation cell)
{
if (cell instanceof CdmaCellLocation)
{
CdmaCellLocation cdmaCell = (CdmaCellLocation)cell;
if (cdmaCell.getSystemId() <= 0)
{
Field getSIDPointer = null;
Field getNIDPointer = null;
int SID = 0, NID = 0, BID = cdmaCell.getBaseStationId();
try {
getSIDPointer = mPhoneState.previousServiceStateObj.getClass().getDeclaredField("mSystemId");
if (getSIDPointer != null)
{
getSIDPointer.setAccessible(true);
SID = (int) getSIDPointer.getInt(cdmaCell);
}
getNIDPointer = mPhoneState.previousServiceStateObj.getClass().getDeclaredField("mNetworkId");
if (getNIDPointer != null)
{
getNIDPointer.setAccessible(true);
NID = (int) getNIDPointer.getInt(cdmaCell);
}
cdmaCell.setCellLocationData(BID, cdmaCell.getBaseStationLatitude(), cdmaCell.getBaseStationLongitude(),
SID, NID); // Update the SID and NID that we read from teh Servicestate
} catch (Exception e) {
//MMCLogger.logToFile(MMCLogger.Level.ERROR, TAG, "checkInnerGsmCellLocation","Field does not exist - mGsmCellLoc");
}
}
}
}
LibPhoneStateListener.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:android-QoS
作者:
评论列表
文章目录