diff options
author | Mike Lockwood <lockwood@android.com> | 2009-06-11 12:25:46 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-06-11 12:42:25 -0400 |
commit | d26ce0d903f5141a346d67b2b94437ef3e2880aa (patch) | |
tree | f6982f2058ed1d61eeb13906f2703f0c459789e4 /location | |
parent | 174231d89adf4a01f28e6074eb8f743240400c26 (diff) | |
download | frameworks_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 'location')
-rw-r--r-- | location/java/com/android/internal/location/GpsLocationProvider.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java index 725fbf9..9698553 100644 --- a/location/java/com/android/internal/location/GpsLocationProvider.java +++ b/location/java/com/android/internal/location/GpsLocationProvider.java @@ -410,6 +410,10 @@ public class GpsLocationProvider extends ILocationProvider.Stub { * Someday we might use this for network location injection to aid the GPS */ public void updateLocation(Location location) { + if (location.hasAccuracy()) { + native_inject_location(location.getLatitude(), location.getLongitude(), + location.getAccuracy()); + } } /** @@ -1210,7 +1214,8 @@ public class GpsLocationProvider extends ILocationProvider.Stub { // mask[0] is ephemeris mask and mask[1] is almanac mask private native int native_read_sv_status(int[] svs, float[] snrs, float[] elevations, float[] azimuths, int[] masks); - + private native void native_inject_location(double latitude, double longitude, float accuracy); + // XTRA Support private native void native_inject_time(long time, long timeReference, int uncertainty); private native boolean native_supports_xtra(); |