public CdmaCellLocationAssert hasSystemId(int id) { isNotNull(); int actualId = actual.getSystemId(); assertThat(actualId) // .overridingErrorMessage("Expected system ID <%s> but was <%s>.", id, actualId) // .isEqualTo(id); return this; } }
public CdmaCellLocationAssert hasSystemId(int id) { isNotNull(); int actualId = actual.getSystemId(); assertThat(actualId) // .overridingErrorMessage("Expected system ID <%s> but was <%s>.", id, actualId) // .isEqualTo(id); return this; } }
/** * A valid cdma cell must have basestation id, network id and system id set * * @param cdmaLocation {@link CdmaCellLocation} * @return true if valid cdma id */ private boolean isValidCdmaCell(final CdmaCellLocation cdmaLocation) { if (cdmaLocation == null) { return false; } return ((cdmaLocation.getBaseStationId() != -1) && (cdmaLocation.getNetworkId() != -1) && (cdmaLocation.getSystemId() != -1)); }
CdmaCellLocation cdmaCellLocation = (CdmaCellLocation) cellLocation; CellIdentityCdma identity = CellIdentityCdma.class.getConstructor(int.class, int.class, int.class, int.class, int.class) .newInstance(cdmaCellLocation.getNetworkId(), cdmaCellLocation.getSystemId(), cdmaCellLocation.getBaseStationId(), cdmaCellLocation.getBaseStationLongitude(), cdmaCellLocation.getBaseStationLatitude()); CellSignalStrengthCdma strength = CellSignalStrengthCdma.class.newInstance();
static CellLocationSingleData fromCellLocation(CellLocation location) { int cid, lac; if (location != null) { if (location instanceof GsmCellLocation) { cid = ((GsmCellLocation) location).getCid(); lac = ((GsmCellLocation) location).getLac(); } else if (location instanceof CdmaCellLocation) { cid = ((CdmaCellLocation) location).getBaseStationId(); lac = ((CdmaCellLocation) location).getSystemId(); } else { return null; } return new CellLocationSingleData(cid, lac); } return null; }
static CellLocationSingleData fromCellLocation(CellLocation location) { int cid, lac; if (location != null) { if (location instanceof GsmCellLocation) { cid = ((GsmCellLocation) location).getCid(); lac = ((GsmCellLocation) location).getLac(); } else if (location instanceof CdmaCellLocation) { cid = ((CdmaCellLocation) location).getBaseStationId(); lac = ((CdmaCellLocation) location).getSystemId(); } else { return null; } return new CellLocationSingleData(cid, lac); } return null; }
TelephonyManager tm = (TelephonyManager) context.getSystemService (Context.TELEPHONY_SERVICE); mnc = ((CdmaCellLocation) tm.getCellLocation()).getSystemId();
rowData.put(CDMA_Data.BASE_STATION_LONGITUDE, loc.getBaseStationLongitude()); rowData.put(CDMA_Data.NETWORK_ID, loc.getNetworkId()); rowData.put(CDMA_Data.SYSTEM_ID, loc.getSystemId()); rowData.put(CDMA_Data.SIGNAL_STRENGTH, lastSignalStrength.getCdmaDbm()); rowData.put(CDMA_Data.CDMA_ECIO, lastSignalStrength.getCdmaEcio());
serving.setSystemId(String.valueOf(cdmaLocation.getSystemId()));
final int systemId = ((CdmaCellLocation) cellLocation).getSystemId(); final int networkId = ((CdmaCellLocation) cellLocation).getNetworkId(); final int baseStationId = ((CdmaCellLocation) cellLocation).getBaseStationId();