diff options
author | Mike Lockwood <lockwood%android.com@gtempaccount.com> | 2011-07-28 14:06:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-07-28 14:06:07 -0700 |
commit | b7d95a46dfacf04896d5b084f13bcbe6eab33633 (patch) | |
tree | c69bb45e727299675d8799f64285bc99dd50023d /services/jni | |
parent | fbaaeb96f29c8e4a563a6b3cc85fb446400fd506 (diff) | |
parent | 21700fedfe29f6a0a752d2bea46142038e69136c (diff) | |
download | frameworks_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-x | services/jni/com_android_server_location_GpsLocationProvider.cpp | 11 |
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"); |