summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-06-11 12:25:46 -0400
committerMike Lockwood <lockwood@android.com>2009-06-11 12:42:25 -0400
commitd26ce0d903f5141a346d67b2b94437ef3e2880aa (patch)
treef6982f2058ed1d61eeb13906f2703f0c459789e4 /core
parent174231d89adf4a01f28e6074eb8f743240400c26 (diff)
downloadframeworks_base-d26ce0d903f5141a346d67b2b94437ef3e2880aa.zip
frameworks_base-d26ce0d903f5141a346d67b2b94437ef3e2880aa.tar.gz
frameworks_base-d26ce0d903f5141a346d67b2b94437ef3e2880aa.tar.bz2
GpsLocationProvider: Add hooks for GPS location injection.
This will allow injecting cell ID location to the GPS (not implemented yet). Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'core')
-rw-r--r--core/jni/android_location_GpsLocationProvider.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/jni/android_location_GpsLocationProvider.cpp b/core/jni/android_location_GpsLocationProvider.cpp
index 0858741..5c4fb22 100644
--- a/core/jni/android_location_GpsLocationProvider.cpp
+++ b/core/jni/android_location_GpsLocationProvider.cpp
@@ -270,6 +270,12 @@ static void android_location_GpsLocationProvider_inject_time(JNIEnv* env, jobjec
sGpsInterface->inject_time(time, timeReference, uncertainty);
}
+static void android_location_GpsLocationProvider_inject_location(JNIEnv* env, jobject obj,
+ jdouble latitude, jdouble longitude, jfloat accuracy)
+{
+ sGpsInterface->inject_location(latitude, longitude, accuracy);
+}
+
static jboolean android_location_GpsLocationProvider_supports_xtra(JNIEnv* env, jobject obj)
{
if (!sGpsXtraInterface) {
@@ -353,6 +359,7 @@ static JNINativeMethod sMethods[] = {
{"native_wait_for_event", "()V", (void*)android_location_GpsLocationProvider_wait_for_event},
{"native_read_sv_status", "([I[F[F[F[I)I", (void*)android_location_GpsLocationProvider_read_sv_status},
{"native_inject_time", "(JJI)V", (void*)android_location_GpsLocationProvider_inject_time},
+ {"native_inject_location", "(DDF)V", (void*)android_location_GpsLocationProvider_inject_location},
{"native_supports_xtra", "()Z", (void*)android_location_GpsLocationProvider_supports_xtra},
{"native_inject_xtra_data", "([BI)V", (void*)android_location_GpsLocationProvider_inject_xtra_data},
{"native_agps_data_conn_open", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_agps_data_conn_open},