summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorStephen Li <stephenl@codeaurora.org>2011-03-01 20:56:00 -0800
committerMike Lockwood <lockwood@android.com>2011-07-28 16:50:45 -0400
commit8efd74dbedb65f69734318d9d6be70767f30b57a (patch)
tree74ca8726784a2348023dda04ec9318df27f28f4c /services/jni
parent0ff79e88e2d90f80d0346e0485abe773ca85c44d (diff)
downloadframeworks_base-8efd74dbedb65f69734318d9d6be70767f30b57a.zip
frameworks_base-8efd74dbedb65f69734318d9d6be70767f30b57a.tar.gz
frameworks_base-8efd74dbedb65f69734318d9d6be70767f30b57a.tar.bz2
gps: Adding ip address for AGps
Change-Id: Ic590187d159853de2f1bd2912e159f0a00d8fb10
Diffstat (limited to 'services/jni')
-rwxr-xr-xservices/jni/com_android_server_location_GpsLocationProvider.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp
index 6d4ad9a..d0e8e57 100755
--- a/services/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -154,8 +154,15 @@ GpsXtraCallbacks sGpsXtraCallbacks = {
static void agps_status_callback(AGpsStatus* agps_status)
{
JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+ uint32_t ipaddr;
+ // ipaddr field was not included in original AGpsStatus
+ if (agps_status->size >= sizeof(AGpsStatus))
+ ipaddr = agps_status->ipaddr;
+ else
+ ipaddr = 0xFFFFFFFF;
env->CallVoidMethod(mCallbacksObj, method_reportAGpsStatus,
- agps_status->type, agps_status->status);
+ agps_status->type, agps_status->status, ipaddr);
checkAndClearExceptionFromCallback(env, __FUNCTION__);
}
@@ -224,7 +231,7 @@ static void android_location_GpsLocationProvider_class_init_native(JNIEnv* env,
method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(IDDDFFFJ)V");
method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V");
method_reportSvStatus = env->GetMethodID(clazz, "reportSvStatus", "()V");
- method_reportAGpsStatus = env->GetMethodID(clazz, "reportAGpsStatus", "(II)V");
+ method_reportAGpsStatus = env->GetMethodID(clazz, "reportAGpsStatus", "(III)V");
method_reportNmea = env->GetMethodID(clazz, "reportNmea", "(J)V");
method_setEngineCapabilities = env->GetMethodID(clazz, "setEngineCapabilities", "(I)V");
method_xtraDownloadRequest = env->GetMethodID(clazz, "xtraDownloadRequest", "()V");