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

Commit 4f860085 authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Check that network provider exists before use

Bug: 173459696
Test: presubmits
Change-Id: Ibb0300526e7f9e690c641ffc84fd74a9fffcd9ed
parent 6b4c503a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -709,9 +709,11 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
                        "GNSS HAL Requesting location updates from %s provider for %d millis.",
                        provider, durationMillis));

        if (locationManager.getProvider(provider) != null) {
            locationManager.requestLocationUpdates(provider, locationRequest.build(),
                    DIRECT_EXECUTOR, locationListener);
        }
    }

    private void injectBestLocation(Location location) {
        if (DEBUG) {