Merge "Check provider exists and is enabled when request location" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4c958d0e6b
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user