Merge "Check provider exists and is enabled when request location" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-24 06:57:34 +00:00
committed by Android (Google) Code Review

View File

@@ -1063,6 +1063,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 for %d millis.",