summaryrefslogtreecommitdiffstats
path: root/location/java/com
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-11 11:41:38 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-06-11 11:41:38 -0700
commit989895e43f59e00fe0f07ac3dd6e373258caf693 (patch)
treeef2d4c13e80add0a157c679c4f6e873907ece171 /location/java/com
parentd881dc7d6aafd08b8a82edddd2735dc411c9ab43 (diff)
parentfa699ea22a13a92694de75ef948a81da23e71642 (diff)
downloadframeworks_base-989895e43f59e00fe0f07ac3dd6e373258caf693.zip
frameworks_base-989895e43f59e00fe0f07ac3dd6e373258caf693.tar.gz
frameworks_base-989895e43f59e00fe0f07ac3dd6e373258caf693.tar.bz2
am fa699ea2: Merge change 3899 into donut
Merge commit 'fa699ea22a13a92694de75ef948a81da23e71642' * commit 'fa699ea22a13a92694de75ef948a81da23e71642': GpsLocationProvider: Add hooks for GPS location injection.
Diffstat (limited to 'location/java/com')
-rw-r--r--location/java/com/android/internal/location/GpsLocationProvider.java7
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();