Prevent startNavigating() call when GPS is off

When system comes back from idle state,
GnssLocationProvider invokes startNavigating()
even when GPS is turned off in settings.

Bug: 29512509
Change-Id: Ifcc6a06d698f65f868d18244f7166663ab57f57e
CRs-Fixed: 1022372
This commit is contained in:
Dante Russo
2016-06-20 11:11:59 -07:00
committed by Aarthi Thiruvengadam
parent f159b74608
commit 260d667b27

View File

@@ -1192,7 +1192,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
}
if (DEBUG) Log.d(TAG, "setRequest " + mProviderRequest);
if (mProviderRequest.reportLocation && !mDisableGps) {
if (mProviderRequest.reportLocation && !mDisableGps && isEnabled()) {
// update client uids
updateClientUids(mWorkSource);