use of android.telephony.CellLocation in project assertj-android by square.
the class TelephonyManagerAssert method hasCellLocation.
public TelephonyManagerAssert hasCellLocation(CellLocation cellLocation) {
isNotNull();
CellLocation actualCellLocation = actual.getCellLocation();
//
assertThat(actualCellLocation).overridingErrorMessage("Expected cell location <%s> but was <%s>.", cellLocation, //
actualCellLocation).isEqualTo(cellLocation);
return this;
}
use of android.telephony.CellLocation in project XobotOS by xamarin.
the class GsmDataConnectionTracker method getCellLocationId.
private int getCellLocationId() {
int cid = -1;
CellLocation loc = mPhone.getCellLocation();
if (loc != null) {
if (loc instanceof GsmCellLocation) {
cid = ((GsmCellLocation) loc).getCid();
} else if (loc instanceof CdmaCellLocation) {
cid = ((CdmaCellLocation) loc).getBaseStationId();
}
}
return cid;
}
Aggregations