Java 类android.telephony.CellSignalStrength 实例源码
项目:proto-collecte
文件:CellInfoUtil.java
private static CommonCellInfo toCellularInfo(CellInfoLte cellInfo) {
CommonCellInfo res = new CommonCellInfo();
CellIdentityLte identityLte = cellInfo.getCellIdentity();
CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();
res.setType(LTE);
res.setCid(identityLte.getCi());
res.setLac(identityLte.getTac());
res.setMcc(identityLte.getMcc());
res.setMnc(identityLte.getMnc());
res.setDbm(valdiateDbm(signalStrength.getDbm()));
res.setLevel(signalStrength.getLevel());
return res;
}
项目:proto-collecte
文件:CellInfoUtil.java
private static CommonCellInfo toCellularInfo(CellInfoGsm cellInfo) {
CommonCellInfo res = new CommonCellInfo();
CellIdentityGsm identityGsm = cellInfo.getCellIdentity();
CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();
res.setType(GSM);
res.setCid(identityGsm.getCid());
res.setLac(identityGsm.getLac());
res.setMcc(identityGsm.getMcc());
res.setMnc(identityGsm.getMnc());
res.setDbm(valdiateDbm(signalStrength.getDbm()));
res.setLevel(signalStrength.getLevel());
return res;
}
项目:proto-collecte
文件:CellInfoUtil.java
private static CommonCellInfo toCellularInfo(CellInfoWcdma cellInfo) {
CommonCellInfo res = new CommonCellInfo();
CellIdentityWcdma identityWcdma = cellInfo.getCellIdentity();
CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();
res.setType(WCDMA);
res.setCid(identityWcdma.getCid());
res.setLac(identityWcdma.getLac());
res.setMcc(identityWcdma.getMcc());
res.setMnc(identityWcdma.getMnc());
res.setDbm(valdiateDbm(signalStrength.getDbm()));
res.setLevel(signalStrength.getLevel());
return res;
}
项目:proto-collecte
文件:CellInfoUtil.java
private static CommonCellInfo toCellularInfo(CellInfoCdma cellInfo) {
CommonCellInfo res = new CommonCellInfo();
CellIdentityCdma identityCdma = cellInfo.getCellIdentity();
CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();
return res;
}