summaryrefslogtreecommitdiffstats
path: root/packages/FusedLocation
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2012-10-03 00:40:50 -0500
committerJeff Hamilton <jham@android.com>2012-10-04 11:00:42 -0500
commitc19efc204aee1f0f3164dc21bd2ef3fdd4259c71 (patch)
tree51d44c5e4dac891b1144f34a351799deb30b2952 /packages/FusedLocation
parent31fed73701041cd5455942abe2dacfc7639c5370 (diff)
downloadframeworks_base-c19efc204aee1f0f3164dc21bd2ef3fdd4259c71.zip
frameworks_base-c19efc204aee1f0f3164dc21bd2ef3fdd4259c71.tar.gz
frameworks_base-c19efc204aee1f0f3164dc21bd2ef3fdd4259c71.tar.bz2
Changes to support updating location providers.
There is now only a single config value pointing at a list of packages to get certs from. The old system was a bit confusing. The fused location provider also now builds against SDK 17, and the meta data service version tag was renamed from the overly generic "version" to "serviceVersion". Bug: 7242814 Change-Id: I00d27c9cbd5cc31a37bb4a98160435d15a72e19e
Diffstat (limited to 'packages/FusedLocation')
-rw-r--r--packages/FusedLocation/AndroidManifest.xml2
-rw-r--r--packages/FusedLocation/src/com/android/location/fused/FusionEngine.java9
2 files changed, 8 insertions, 3 deletions
diff --git a/packages/FusedLocation/AndroidManifest.xml b/packages/FusedLocation/AndroidManifest.xml
index 4c57401..7df4b72 100644
--- a/packages/FusedLocation/AndroidManifest.xml
+++ b/packages/FusedLocation/AndroidManifest.xml
@@ -39,7 +39,7 @@
<intent-filter>
<action android:name="com.android.location.service.FusedLocationProvider" />
</intent-filter>
- <meta-data android:name="version" android:value="1" />
+ <meta-data android:name="serviceVersion" android:value="1" />
</service>
</application>
</manifest>
diff --git a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
index 2cf795d..c62c0d7 100644
--- a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
+++ b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
@@ -247,7 +247,7 @@ public class FusionEngine implements LocationListener {
mNetworkWeight /= totalWeight;
mGpsWeight /= totalWeight;
- Location fused = new Location(LocationManager.FUSED_PROVIDER);
+ Location fused = new Location(/* LocationManager.FUSED_PROVIDER */ "fused");
// fuse lat/long
// assumes the two locations are close enough that earth curvature doesn't matter
fused.setLatitude(weigh(mGpsLocation.getLatitude(), mNetworkLocation.getLatitude()));
@@ -303,7 +303,12 @@ public class FusionEngine implements LocationListener {
}
if (mNetworkLocation != null) {
- fused.setExtraLocation(Location.EXTRA_NO_GPS_LOCATION, mNetworkLocation);
+ // Manually set the extras for the "no gps" location, pointing at the NLP
+ Bundle extras = new Bundle();
+ extras.putParcelable("noGPSLocation", mNetworkLocation);
+ fused.setExtras(extras);
+ // Done inline above to compile against SDK 17
+ //fused.setExtraLocation(Location.EXTRA_NO_GPS_LOCATION, mNetworkLocation);
}
mFusedLocation = fused;