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
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user