Methods Summary |
---|
public static double | convertQuartSecToDecDegrees(int quartSec)Converts latitude or longitude from 0.25 seconds (as defined in the
3GPP2 C.S0005-A v6.0 standard) to decimal degrees
if(Double.isNaN(quartSec) || quartSec < -2592000 || quartSec > 2592000){
// Invalid value
throw new IllegalArgumentException("Invalid coordiante value:" + quartSec);
}
return ((double)quartSec) / (3600 * 4);
|
public boolean | equals(java.lang.Object o)
CdmaCellLocation s;
try {
s = (CdmaCellLocation)o;
} catch (ClassCastException ex) {
return false;
}
if (o == null) {
return false;
}
return (equalsHandlesNulls(this.mBaseStationId, s.mBaseStationId) &&
equalsHandlesNulls(this.mBaseStationLatitude, s.mBaseStationLatitude) &&
equalsHandlesNulls(this.mBaseStationLongitude, s.mBaseStationLongitude) &&
equalsHandlesNulls(this.mSystemId, s.mSystemId) &&
equalsHandlesNulls(this.mNetworkId, s.mNetworkId)
);
|
private static boolean | equalsHandlesNulls(java.lang.Object a, java.lang.Object b)Test whether two objects hold the same data values or both are null
return (a == null) ? (b == null) : a.equals (b);
|
public void | fillInNotifierBundle(android.os.Bundle bundleToFill)Fill the cell location data into the intent notifier Bundle based on service state
bundleToFill.putInt("baseStationId", this.mBaseStationId);
bundleToFill.putInt("baseStationLatitude", this.mBaseStationLatitude);
bundleToFill.putInt("baseStationLongitude", this.mBaseStationLongitude);
bundleToFill.putInt("systemId", this.mSystemId);
bundleToFill.putInt("networkId", this.mNetworkId);
|
public int | getBaseStationId()
return this.mBaseStationId;
|
public int | getBaseStationLatitude()Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
(http://www.3gpp2.org/public_html/specs/C.S0005-A_v6.0.pdf)
It is represented in units of 0.25 seconds and ranges from -1296000
to 1296000, both values inclusive (corresponding to a range of -90
to +90 degrees). Integer.MAX_VALUE is considered invalid value.
return this.mBaseStationLatitude;
|
public int | getBaseStationLongitude()Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
(http://www.3gpp2.org/public_html/specs/C.S0005-A_v6.0.pdf)
It is represented in units of 0.25 seconds and ranges from -2592000
to 2592000, both values inclusive (corresponding to a range of -180
to +180 degrees). Integer.MAX_VALUE is considered invalid value.
return this.mBaseStationLongitude;
|
public int | getNetworkId()
return this.mNetworkId;
|
public int | getSystemId()
return this.mSystemId;
|
public int | hashCode()
return this.mBaseStationId ^ this.mBaseStationLatitude ^ this.mBaseStationLongitude
^ this.mSystemId ^ this.mNetworkId;
|
public boolean | isEmpty()
return (this.mBaseStationId == -1 &&
this.mBaseStationLatitude == INVALID_LAT_LONG &&
this.mBaseStationLongitude == INVALID_LAT_LONG &&
this.mSystemId == -1 &&
this.mNetworkId == -1);
|
public void | setCellLocationData(int baseStationId, int baseStationLatitude, int baseStationLongitude, int systemId, int networkId)Set the cell location data.
// The following values have to be written in the correct sequence
this.mBaseStationId = baseStationId;
this.mBaseStationLatitude = baseStationLatitude; //values[2];
this.mBaseStationLongitude = baseStationLongitude; //values[3];
this.mSystemId = systemId;
this.mNetworkId = networkId;
|
public void | setCellLocationData(int baseStationId, int baseStationLatitude, int baseStationLongitude)Set the cell location data.
// The following values have to be written in the correct sequence
this.mBaseStationId = baseStationId;
this.mBaseStationLatitude = baseStationLatitude; //values[2];
this.mBaseStationLongitude = baseStationLongitude; //values[3];
|
public void | setStateInvalid()Invalidate this object. The cell location data is set to invalid values.
this.mBaseStationId = -1;
this.mBaseStationLatitude = INVALID_LAT_LONG;
this.mBaseStationLongitude = INVALID_LAT_LONG;
this.mSystemId = -1;
this.mNetworkId = -1;
|
public java.lang.String | toString()
return "[" + this.mBaseStationId + ","
+ this.mBaseStationLatitude + ","
+ this.mBaseStationLongitude + ","
+ this.mSystemId + ","
+ this.mNetworkId + "]";
|