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

Commit 2649108d authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Check provider exists and is enabled when request location

Bug: 78210719
Change-Id: I70cdec87322c4a13ff86ea33eedef005c98fc16e
Fixes: 78210719
Test: TODO
parent ae4518c7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1054,6 +1054,12 @@ public class GnssLocationProvider implements LocationProviderInterface, InjectNt
            locationListener = mFusedLocationListener;
        }

        if (!locationManager.isProviderEnabled(provider)) {
            Log.w(TAG, "Unable to request location since " + provider
                    + " provider does not exist or is not enabled.");
            return;
        }

        Log.i(TAG,
                String.format("GNSS HAL Requesting location updates from %s provider.", provider));
        locationManager.requestLocationUpdates(provider,