/**
* Create a {@link CellRecord} for the serving cell by parsing {@link CellLocation}
*
* @param cell {@link CellLocation}
* @param position {@link PositionRecord} Current position
* @return Serialized cell record
*/
@SuppressLint("NewApi")
private CellRecord processServingCellLocation(final CellLocation cell, final PositionRecord position) {
if (cell instanceof GsmCellLocation) {
/*
* In case of GSM network set GSM specific values
*/
final GsmCellLocation gsmLocation = (GsmCellLocation) cell;
if (isValidGsmCell(gsmLocation)) {
Log.i(TAG, "Assuming gsm (assumption based on cell-id" + gsmLocation.getCid() + ")");
final CellRecord serving = processGsm(position, gsmLocation);
if (serving == null) {
return null;
}
return serving;
}
} else if (cell instanceof CdmaCellLocation) {
final CdmaCellLocation cdmaLocation = (CdmaCellLocation) cell;
if (isValidCdmaCell(cdmaLocation)) {
/*
* In case of CDMA network set CDMA specific values
* Assume CDMA network, if cdma location and basestation, network and system id are available
*/
Log.i(TAG, "Assuming cdma for cell " + cdmaLocation.getBaseStationId());
return processCdma(position, cdmaLocation);
}
}
return null;
}
WirelessLoggerService.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:radiocells-scanner-android
作者:
评论列表
文章目录