Merge "Fix some location issues exposed by CTS." into jb-mr1-dev
This commit is contained in:
@@ -145,7 +145,7 @@ public final class ProviderProperties implements Parcelable {
|
|||||||
parcel.writeInt(mHasMonetaryCost ? 1 : 0);
|
parcel.writeInt(mHasMonetaryCost ? 1 : 0);
|
||||||
parcel.writeInt(mSupportsAltitude ? 1 : 0);
|
parcel.writeInt(mSupportsAltitude ? 1 : 0);
|
||||||
parcel.writeInt(mSupportsSpeed ? 1 : 0);
|
parcel.writeInt(mSupportsSpeed ? 1 : 0);
|
||||||
parcel.writeInt(mSupportsSpeed ? 1 : 0);
|
parcel.writeInt(mSupportsBearing ? 1 : 0);
|
||||||
parcel.writeInt(mPowerRequirement);
|
parcel.writeInt(mPowerRequirement);
|
||||||
parcel.writeInt(mAccuracy);
|
parcel.writeInt(mAccuracy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1566,7 +1566,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Obs
|
|||||||
MockProvider provider = new MockProvider(name, this, properties);
|
MockProvider provider = new MockProvider(name, this, properties);
|
||||||
// remove the real provider if we are replacing GPS or network provider
|
// remove the real provider if we are replacing GPS or network provider
|
||||||
if (LocationManager.GPS_PROVIDER.equals(name)
|
if (LocationManager.GPS_PROVIDER.equals(name)
|
||||||
|| LocationManager.NETWORK_PROVIDER.equals(name)) {
|
|| LocationManager.NETWORK_PROVIDER.equals(name)
|
||||||
|
|| LocationManager.FUSED_PROVIDER.equals(name)) {
|
||||||
LocationProviderInterface p = mProvidersByName.get(name);
|
LocationProviderInterface p = mProvidersByName.get(name);
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
removeProviderLocked(p);
|
removeProviderLocked(p);
|
||||||
|
|||||||
Reference in New Issue
Block a user