summaryrefslogtreecommitdiffstats
path: root/services/core/jni
diff options
context:
space:
mode:
authordestradaa <destradaa@google.com>2015-05-29 13:47:39 -0700
committerdestradaa <destradaa@google.com>2015-05-29 13:49:20 -0700
commitce48c1c1d8033e0bb62e0b24645b5c600c4adfc6 (patch)
tree8ec6b156fc20a80be5d5a5b12a59d9f37b507d9a /services/core/jni
parent650a91356b59fe4100f624c0b32d397ec00d51d9 (diff)
downloadframeworks_base-ce48c1c1d8033e0bb62e0b24645b5c600c4adfc6.zip
frameworks_base-ce48c1c1d8033e0bb62e0b24645b5c600c4adfc6.tar.gz
frameworks_base-ce48c1c1d8033e0bb62e0b24645b5c600c4adfc6.tar.bz2
Allow INADDR_NONE as a valid configuration in AGpsStatus_v3.
b/21516868 This change makes AGpsStatus_v3 consistent and compatible with the behavior of AGpsStatus_v2. Change-Id: Ia4e729d8ed1d61b51ae22c7eaf9bbe33f31b7a45
Diffstat (limited to 'services/core/jni')
-rw-r--r--services/core/jni/com_android_server_location_GpsLocationProvider.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/jni/com_android_server_location_GpsLocationProvider.cpp b/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
index 3804e1d..5c27b1f 100644
--- a/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -220,9 +220,9 @@ static void agps_status_callback(AGpsStatus* agps_status)
case AF_INET:
{
struct sockaddr_in *in = (struct sockaddr_in*)&(agps_status->addr);
- uint32_t *pAddr = (uint32_t*)&(in->sin_addr);
- byteArray = convert_to_ipv4(*pAddr, true /* net_order */);
- if (byteArray != NULL) {
+ uint32_t ipAddr = *(uint32_t*)&(in->sin_addr);
+ byteArray = convert_to_ipv4(ipAddr, true /* net_order */);
+ if (ipAddr == INADDR_NONE || byteArray != NULL) {
isSupported = true;
}
IF_ALOGD() {