commit | d1b3429cbd4a159867da90fdb6295199fd460179 | [log] [tgz] |
---|---|---|
author | Yu-Han Yang <yuhany@google.com> | Tue Apr 24 00:12:20 2018 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Tue Apr 24 00:12:20 2018 -0700 |
tree | 83272cdde670a584714031c438923e0f43c06de3 | |
parent | 1673d220973865c6620554d7a584ab24098b56a4 [diff] | |
parent | 566987a3be78c4dcf0de9d9a40be8ed3d8c149d4 [diff] |
Merge "Check provider exists and is enabled when request location" into pi-dev am: 4c958d0e6b am: 566987a3be Change-Id: If27d5bbe87613a6c977787b668429359616391c1
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java index ec5182d..756d06b 100644 --- a/services/core/java/com/android/server/location/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -1063,6 +1063,12 @@ 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.",