summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Harold <nharold@google.com>2017-07-07 17:12:04 -0700
committerpkanwar <pkanwar@google.com>2017-07-10 11:56:31 -0700
commit35afd645373ee61324101f3a43dcaa0992fea95d (patch)
treee2062f368028647ebf7c7c7a04fecb6ddad84913
parentb4d732b0464ef94878dbaba7479809ca9c1fe751 (diff)
downloadandroid_hardware_ril-35afd645373ee61324101f3a43dcaa0992fea95d.tar.gz
android_hardware_ril-35afd645373ee61324101f3a43dcaa0992fea95d.tar.bz2
android_hardware_ril-35afd645373ee61324101f3a43dcaa0992fea95d.zip
Fix the RIL-to-HIDL conversion for Cell Lat and Long
The legacy RIL interface received Lat and Long in that order. The HIDL interface structure uses Long and Lat. This fixes a swaparoo in the compatibility layer. * RIL_REQUEST_VOICE_REGISTRATION_STATE * * ... skipping a bunch of stuff * * ((const char **)response)[5] is Base Station latitude if registered on a * CDMA system or NULL if not. Base Station * 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). * ((const char **)response)[6] is Base Station longitude if registered on a * CDMA system or NULL if not. Base Station * 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). Bug: 63274800 Test: manual Change-Id: If2de7f5d0e0d0f470f824aa4f2329de4ad98eb6c
-rw-r--r--libril/ril_service.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp
index 308955a..bd21ba5 100644
--- a/libril/ril_service.cpp
+++ b/libril/ril_service.cpp
@@ -3631,9 +3631,10 @@ void fillCellIdentityFromVoiceRegStateResponseString(CellIdentity &cellIdentity,
case RIL_CELL_INFO_TYPE_CDMA:{
rilCellIdentity.cellIdentityCdma.basestationId =
convertResponseStringEntryToInt(response, 4, numStrings);
- rilCellIdentity.cellIdentityCdma.longitude =
- convertResponseStringEntryToInt(response, 5, numStrings);
+ /* Order of Lat. and Long. swapped between RIL and HIDL interface versions. */
rilCellIdentity.cellIdentityCdma.latitude =
+ convertResponseStringEntryToInt(response, 5, numStrings);
+ rilCellIdentity.cellIdentityCdma.longitude =
convertResponseStringEntryToInt(response, 6, numStrings);
rilCellIdentity.cellIdentityCdma.systemId =
convertResponseStringEntryToInt(response, 8, numStrings);