Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d3ba52a authored by Ashwin Kumar's avatar Ashwin Kumar Committed by Steve Kondik
Browse files

Fix for crash in LocationManagerService

Resolved issue where MockProvider was being cast to
LocationProviderProxy and would cause a fatal exception.

Change-Id: I7c8c83961dd03d59292e773b01995ed6b3ac04c7
CRs-fixed: 619882
parent 0bc78fec
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2138,11 +2138,14 @@ public class LocationManagerService extends ILocationManager.Stub {

    private Location screenLocationLocked(Location location, String provider) {

        if (isMockProvider(LocationManager.NETWORK_PROVIDER)) {
            return location;
        }

        LocationProviderProxy providerProxy =
                (LocationProviderProxy)mProvidersByName.get(LocationManager.NETWORK_PROVIDER);
        if (mComboNlpPackageName == null || providerProxy == null ||
            false == provider.equals(LocationManager.NETWORK_PROVIDER) ||
            isMockProvider(LocationManager.NETWORK_PROVIDER)) {
            false == provider.equals(LocationManager.NETWORK_PROVIDER)) {
            return location;
        }