summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-19 12:09:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-19 12:09:36 -0700
commitf781b39cb89dc19e6ad090bd3eb1bedbe7928429 (patch)
tree18bfbb913577021671232dcdcc1e659b0324e47d /core
parentba6409f1f69db7dfa16d5b914d2bc41a3aa43caf (diff)
parenta9e546169b3c2c9c5f248d2f3abe3b934f48695d (diff)
downloadframeworks_base-f781b39cb89dc19e6ad090bd3eb1bedbe7928429.zip
frameworks_base-f781b39cb89dc19e6ad090bd3eb1bedbe7928429.tar.gz
frameworks_base-f781b39cb89dc19e6ad090bd3eb1bedbe7928429.tar.bz2
Merge change 4786 into donut
* changes: gps: Set SUPL server via hostname rather than IP address.
Diffstat (limited to 'core')
-rwxr-xr-x[-rw-r--r--]core/jni/android_location_GpsLocationProvider.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/jni/android_location_GpsLocationProvider.cpp b/core/jni/android_location_GpsLocationProvider.cpp
index 5c4fb22..bf0bd65 100644..100755
--- a/core/jni/android_location_GpsLocationProvider.cpp
+++ b/core/jni/android_location_GpsLocationProvider.cpp
@@ -336,13 +336,15 @@ static void android_location_GpsLocationProvider_agps_data_conn_failed(JNIEnv* e
}
static void android_location_GpsLocationProvider_set_agps_server(JNIEnv* env, jobject obj,
- jint type, jint addr, jint port)
+ jint type, jstring hostname, jint port)
{
if (!sAGpsInterface) {
sAGpsInterface = (const AGpsInterface*)sGpsInterface->get_extension(AGPS_INTERFACE);
}
if (sAGpsInterface) {
- sAGpsInterface->set_server(type, addr, port);
+ const char *c_hostname = env->GetStringUTFChars(hostname, NULL);
+ sAGpsInterface->set_server(type, c_hostname, port);
+ env->ReleaseStringUTFChars(hostname, c_hostname);
}
}
@@ -365,7 +367,7 @@ static JNINativeMethod sMethods[] = {
{"native_agps_data_conn_open", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_agps_data_conn_open},
{"native_agps_data_conn_closed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_closed},
{"native_agps_data_conn_failed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_failed},
- {"native_set_agps_server", "(III)V", (void*)android_location_GpsLocationProvider_set_agps_server},
+ {"native_set_agps_server", "(ILjava/lang/String;I)V", (void*)android_location_GpsLocationProvider_set_agps_server},
};
int register_android_location_GpsLocationProvider(JNIEnv* env)