public CellInfoLteAssert hasCellIdentity(CellIdentityLte cellIdentity) { isNotNull(); CellIdentityLte actualCellIdentity = actual.getCellIdentity(); assertThat(actualCellIdentity) // .overridingErrorMessage("Expected cell identity <%s> but was <%s>.", cellIdentity, actualCellIdentity) // .isEqualTo(cellIdentity); return this; }
public CellInfoLteAssert hasCellSignalStrength(CellSignalStrengthLte cellSignalStrength) { isNotNull(); CellSignalStrengthLte actualCellSignalStrength = actual.getCellSignalStrength(); assertThat(actualCellSignalStrength) // .overridingErrorMessage("Expected cell signal strength <%s> but was <%s>.", cellSignalStrength, actualCellSignalStrength) // .isEqualTo(cellSignalStrength); return this; } }
@SuppressWarnings("ChainOfInstanceofChecks") @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) private Cell parceCellInfo18(CellInfo info) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) return null; if (info instanceof CellInfoWcdma) { CellIdentityWcdma identity = ((CellInfoWcdma) info).getCellIdentity(); if (identity.getMcc() == Integer.MAX_VALUE) return null; CellSignalStrengthWcdma strength = ((CellInfoWcdma) info).getCellSignalStrength(); return new Cell(Cell.CellType.UMTS, identity.getMcc(), identity.getMnc(), identity.getLac(), identity.getCid(), identity.getPsc(), strength.getDbm()); } else if (info instanceof CellInfoLte) { CellIdentityLte identity = ((CellInfoLte) info).getCellIdentity(); if (identity.getMcc() == Integer.MAX_VALUE) return null; CellSignalStrengthLte strength = ((CellInfoLte) info).getCellSignalStrength(); return new Cell(Cell.CellType.LTE, identity.getMcc(), identity.getMnc(), identity.getTac(), identity.getCi(), identity.getPci(), strength.getDbm()); } return null; }
cellStrengthG.getDbm(), NetworkType.typeForCode("G"), location); case "CellInfoLte": g = new GsmOperator(((CellInfoLte) (cellInfo)).getCellIdentity()); CellSignalStrengthLte cellStrengthL = ((CellInfoLte) (cellInfo)).getCellSignalStrength(); return addOrUpdateCell(g.getOperatorKeyString(), g.getOperatorString(), g.getXfcn(), "LTE", cellStrengthL.getDbm(), NetworkType.typeForCode("L"), location);
CellIdentityLte id = info.getCellIdentity(); id.getMnc() + "/" + id.getCi() + "/" + id.getPci() + "/" + id.getTac(); int asu = (info.getCellSignalStrength().getAsuLevel() * MAXIMUM_ASU) / 97;
public CellInfoLteAssert hasCellIdentity(CellIdentityLte cellIdentity) { isNotNull(); CellIdentityLte actualCellIdentity = actual.getCellIdentity(); assertThat(actualCellIdentity) // .overridingErrorMessage("Expected cell identity <%s> but was <%s>.", cellIdentity, actualCellIdentity) // .isEqualTo(cellIdentity); return this; }
public CellInfoLteAssert hasCellSignalStrength(CellSignalStrengthLte cellSignalStrength) { isNotNull(); CellSignalStrengthLte actualCellSignalStrength = actual.getCellSignalStrength(); assertThat(actualCellSignalStrength) // .overridingErrorMessage("Expected cell signal strength <%s> but was <%s>.", cellSignalStrength, actualCellSignalStrength) // .isEqualTo(cellSignalStrength); return this; } }
final CellIdentityLte lteIdentity = ((CellInfoLte) cell).getCellIdentity(); if (isValidLteCell(lteIdentity)) { Log.i(TAG, "Processing LTE cell " + lteIdentity.getCi()); result.setPsc(lteIdentity.getPci()); result.setStrengthdBm(((CellInfoLte) cell).getCellSignalStrength().getDbm()); result.setStrengthAsu(((CellInfoLte) cell).getCellSignalStrength().getAsuLevel()); return result;
identity = ((CellInfoGsm) info).getCellIdentity(); else if (info instanceof CellInfoLte) identity = ((CellInfoLte) info).getCellIdentity(); else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && info instanceof CellInfoWcdma)
out.name("registered").value(cellInfo.isRegistered()); out.name("asu").value(lteInfo.getCellSignalStrength().getAsuLevel()); out.name("dbm").value(lteInfo.getCellSignalStrength().getDbm()); writeIfKnown(out, "level", lteInfo.getCellSignalStrength().getLevel()); writeIfKnown(out, "timing_advance", lteInfo.getCellSignalStrength().getTimingAdvance()); writeIfKnown(out, "ci", lteInfo.getCellIdentity().getCi()); writeIfKnown(out, "pci", lteInfo.getCellIdentity().getPci()); writeIfKnown(out, "tac", lteInfo.getCellIdentity().getTac()); writeIfKnown(out, "mcc", lteInfo.getCellIdentity().getMcc()); writeIfKnown(out, "mnc", lteInfo.getCellIdentity().getMnc()); } else if (cellInfo instanceof CellInfoCdma) { CellInfoCdma cdmaInfo = (CellInfoCdma) cellInfo;
CellIdentityLte cellIdentityLte = ((CellInfoLte) i).getCellIdentity(); if(cellIdentityLte==null)continue; tower.locationAreaCode = lac;
} else if (c instanceof CellInfoLte) { cell.cellId = ((CellInfoLte) c).getCellIdentity().getCi(); cell.area = ((CellInfoLte) c).getCellIdentity().getTac(); cell.mcc = ((CellInfoLte)c).getCellIdentity().getMcc(); cell.mnc = ((CellInfoLte)c).getCellIdentity().getMnc(); cell.technology = mTelephonyManager.getNetworkType(); appendLog(context, TAG, "CellInfoLte for ", cell.mcc, cell.mnc, cell.area, cell.cellId, cell.technology, ((CellInfoLte)c).getCellIdentity().getPci()); } else if (c instanceof CellInfoWcdma) {