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

Commit 0f59f9ff authored by Ashwin Kumar's avatar Ashwin Kumar Committed by Dante Russo
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 9aead93e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2135,11 +2135,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;
        }