summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
authorNaveen Kalla <nkalla@quicinc.com>2009-10-22 10:47:03 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-22 10:47:03 -0700
commit6183a3ed5b72902a8e4a441b4d9e99630cb42ee3 (patch)
tree8ab5ba1ac127780e4fc9d4227b6d55999d092254 /telephony/java/android
parentf7f671edefceefaf68ab28a81ff2dffa54883b6b (diff)
parent076cb23a024f256817b5dc22830c3f9a9e0a44a7 (diff)
downloadframeworks_base-6183a3ed5b72902a8e4a441b4d9e99630cb42ee3.zip
frameworks_base-6183a3ed5b72902a8e4a441b4d9e99630cb42ee3.tar.gz
frameworks_base-6183a3ed5b72902a8e4a441b4d9e99630cb42ee3.tar.bz2
am 076cb23a: Merge change I13dd02fc into eclair
Merge commit '076cb23a024f256817b5dc22830c3f9a9e0a44a7' into eclair-mr2 * commit '076cb23a024f256817b5dc22830c3f9a9e0a44a7': telephony/cdma: Fix Erroneous Roaming Indicators and Latitude-Longitude parsing
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/cdma/CdmaCellLocation.java36
1 files changed, 26 insertions, 10 deletions
diff --git a/telephony/java/android/telephony/cdma/CdmaCellLocation.java b/telephony/java/android/telephony/cdma/CdmaCellLocation.java
index 676fba7..7ef7747 100644
--- a/telephony/java/android/telephony/cdma/CdmaCellLocation.java
+++ b/telephony/java/android/telephony/cdma/CdmaCellLocation.java
@@ -24,19 +24,35 @@ import android.telephony.CellLocation;
*/
public class CdmaCellLocation extends CellLocation {
private int mBaseStationId = -1;
- private int mBaseStationLatitude = -1;
- private int mBaseStationLongitude = -1;
+
+ /**
+ * Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
+ * 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.
+ */
+ private int mBaseStationLatitude = Integer.MAX_VALUE;
+
+ /**
+ * Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
+ * 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.
+ */
+ private int mBaseStationLongitude = Integer.MAX_VALUE;
+
private int mSystemId = -1;
private int mNetworkId = -1;
/**
* Empty constructor.
- * Initializes the BID, SID, NID and base station latitude and longitude to -1.
+ * Initializes the BID, SID, NID and base station latitude and longitude
+ * to invalid values.
*/
public CdmaCellLocation() {
this.mBaseStationId = -1;
- this.mBaseStationLatitude = -1;
- this.mBaseStationLongitude = -1;
+ this.mBaseStationLatitude = Integer.MAX_VALUE;
+ this.mBaseStationLongitude = Integer.MAX_VALUE;
this.mSystemId = -1;
this.mNetworkId = -1;
}
@@ -60,14 +76,14 @@ public class CdmaCellLocation extends CellLocation {
}
/**
- * @return cdma base station latitude, -1 if unknown
+ * @return cdma base station latitude, Integer.MAX_VALUE if unknown
*/
public int getBaseStationLatitude() {
return this.mBaseStationLatitude;
}
/**
- * @return cdma base station longitude, -1 if unknown
+ * @return cdma base station longitude, Integer.MAX_VALUE if unknown
*/
public int getBaseStationLongitude() {
return this.mBaseStationLongitude;
@@ -88,12 +104,12 @@ public class CdmaCellLocation extends CellLocation {
}
/**
- * Invalidate this object. The cell location data is set to -1.
+ * Invalidate this object. The cell location data is set to invalid values.
*/
public void setStateInvalid() {
this.mBaseStationId = -1;
- this.mBaseStationLatitude = -1;
- this.mBaseStationLongitude = -1;
+ this.mBaseStationLatitude = Integer.MAX_VALUE;
+ this.mBaseStationLongitude = Integer.MAX_VALUE;
this.mSystemId = -1;
this.mNetworkId = -1;
}