summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorMike Lockwood <lockwood%android.com@gtempaccount.com>2011-07-28 14:06:07 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-07-28 14:06:07 -0700
commitb7d95a46dfacf04896d5b084f13bcbe6eab33633 (patch)
treec69bb45e727299675d8799f64285bc99dd50023d /services/jni
parentfbaaeb96f29c8e4a563a6b3cc85fb446400fd506 (diff)
parent21700fedfe29f6a0a752d2bea46142038e69136c (diff)
downloadframeworks_base-b7d95a46dfacf04896d5b084f13bcbe6eab33633.zip
frameworks_base-b7d95a46dfacf04896d5b084f13bcbe6eab33633.tar.gz
frameworks_base-b7d95a46dfacf04896d5b084f13bcbe6eab33633.tar.bz2
am 21700fed: am 5f7203eb: am 5a27a754: am bd1dee94: Merge "gps: Adding ip address for AGps"
* commit '21700fedfe29f6a0a752d2bea46142038e69136c': gps: Adding ip address for AGps
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 87ffcba..c29be3a 100755
--- a/services/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -163,8 +163,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__);
}
@@ -233,7 +240,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");