Loading core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,14 @@ config_enableFusedLocationOverlay is false. --> <string name="config_fusedLocationProviderPackageName" translatable="false">com.android.location.fused</string> <!-- If true will use the GNSS hardware implementation to service the GPS_PROVIDER. If false will allow the GPS_PROVIDER to be replaced by an app at run-time (restricted to the package specified by config_gnssLocationProviderPackageName). --> <bool name="config_useGnssHardwareProvider" translatable="false">true</bool> <!-- Package name providing GNSS location support. Used only when config_useGnssHardwareProvider is false. --> <string name="config_gnssLocationProviderPackageName" translatable="false">@null</string> <!-- Default value for the ADAS GNSS Location Enabled setting if this setting has never been set before. --> <bool name="config_defaultAdasGnssLocationEnabled" translatable="false">false</bool> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1963,6 +1963,7 @@ <java-symbol type="bool" name="config_enableActivityRecognitionHardwareOverlay" /> <java-symbol type="bool" name="config_defaultAdasGnssLocationEnabled" /> <java-symbol type="bool" name="config_enableFusedLocationOverlay" /> <java-symbol type="bool" name="config_useGnssHardwareProvider" /> <java-symbol type="bool" name="config_enableGeocoderOverlay" /> <java-symbol type="bool" name="config_enableGeofenceOverlay" /> <java-symbol type="bool" name="config_enableNetworkLocationOverlay" /> Loading Loading @@ -2125,6 +2126,7 @@ <java-symbol type="string" name="config_datause_iface" /> <java-symbol type="string" name="config_activityRecognitionHardwarePackageName" /> <java-symbol type="string" name="config_fusedLocationProviderPackageName" /> <java-symbol type="string" name="config_gnssLocationProviderPackageName" /> <java-symbol type="string" name="config_geocoderProviderPackageName" /> <java-symbol type="string" name="config_geofenceProviderPackageName" /> <java-symbol type="string" name="config_networkLocationProviderPackageName" /> Loading location/java/android/location/provider/LocationProviderBase.java +9 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,15 @@ public abstract class LocationProviderBase { public static final String ACTION_FUSED_PROVIDER = "com.android.location.service.FusedLocationProvider"; /** * The action the wrapping service should have in its intent filter to implement the * {@link android.location.LocationManager#GPS_PROVIDER}. * * @hide */ public static final String ACTION_GNSS_PROVIDER = "android.location.provider.action.GNSS_PROVIDER"; final String mTag; final @Nullable String mAttributionTag; final IBinder mBinder; Loading services/core/java/com/android/server/location/LocationManagerService.java +17 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.location.LocationManager.GPS_PROVIDER; import static android.location.LocationManager.NETWORK_PROVIDER; import static android.location.LocationRequest.LOW_POWER_EXCEPTIONS; import static android.location.provider.LocationProviderBase.ACTION_FUSED_PROVIDER; import static android.location.provider.LocationProviderBase.ACTION_GNSS_PROVIDER; import static android.location.provider.LocationProviderBase.ACTION_NETWORK_PROVIDER; import static com.android.server.location.LocationPermissions.PERMISSION_COARSE; Loading Loading @@ -439,9 +440,24 @@ public class LocationManagerService extends ILocationManager.Stub implements mGnssManagerService = new GnssManagerService(mContext, mInjector, gnssNative); mGnssManagerService.onSystemReady(); boolean useGnssHardwareProvider = mContext.getResources().getBoolean( com.android.internal.R.bool.config_useGnssHardwareProvider); AbstractLocationProvider gnssProvider = null; if (!useGnssHardwareProvider) { gnssProvider = ProxyLocationProvider.create( mContext, GPS_PROVIDER, ACTION_GNSS_PROVIDER, com.android.internal.R.bool.config_useGnssHardwareProvider, com.android.internal.R.string.config_gnssLocationProviderPackageName); } if (gnssProvider == null) { gnssProvider = mGnssManagerService.getGnssLocationProvider(); } LocationProviderManager gnssManager = new LocationProviderManager(mContext, mInjector, GPS_PROVIDER, mPassiveManager); addLocationProviderManager(gnssManager, mGnssManagerService.getGnssLocationProvider()); addLocationProviderManager(gnssManager, gnssProvider); } // bind to geocoder provider Loading Loading
core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,14 @@ config_enableFusedLocationOverlay is false. --> <string name="config_fusedLocationProviderPackageName" translatable="false">com.android.location.fused</string> <!-- If true will use the GNSS hardware implementation to service the GPS_PROVIDER. If false will allow the GPS_PROVIDER to be replaced by an app at run-time (restricted to the package specified by config_gnssLocationProviderPackageName). --> <bool name="config_useGnssHardwareProvider" translatable="false">true</bool> <!-- Package name providing GNSS location support. Used only when config_useGnssHardwareProvider is false. --> <string name="config_gnssLocationProviderPackageName" translatable="false">@null</string> <!-- Default value for the ADAS GNSS Location Enabled setting if this setting has never been set before. --> <bool name="config_defaultAdasGnssLocationEnabled" translatable="false">false</bool> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1963,6 +1963,7 @@ <java-symbol type="bool" name="config_enableActivityRecognitionHardwareOverlay" /> <java-symbol type="bool" name="config_defaultAdasGnssLocationEnabled" /> <java-symbol type="bool" name="config_enableFusedLocationOverlay" /> <java-symbol type="bool" name="config_useGnssHardwareProvider" /> <java-symbol type="bool" name="config_enableGeocoderOverlay" /> <java-symbol type="bool" name="config_enableGeofenceOverlay" /> <java-symbol type="bool" name="config_enableNetworkLocationOverlay" /> Loading Loading @@ -2125,6 +2126,7 @@ <java-symbol type="string" name="config_datause_iface" /> <java-symbol type="string" name="config_activityRecognitionHardwarePackageName" /> <java-symbol type="string" name="config_fusedLocationProviderPackageName" /> <java-symbol type="string" name="config_gnssLocationProviderPackageName" /> <java-symbol type="string" name="config_geocoderProviderPackageName" /> <java-symbol type="string" name="config_geofenceProviderPackageName" /> <java-symbol type="string" name="config_networkLocationProviderPackageName" /> Loading
location/java/android/location/provider/LocationProviderBase.java +9 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,15 @@ public abstract class LocationProviderBase { public static final String ACTION_FUSED_PROVIDER = "com.android.location.service.FusedLocationProvider"; /** * The action the wrapping service should have in its intent filter to implement the * {@link android.location.LocationManager#GPS_PROVIDER}. * * @hide */ public static final String ACTION_GNSS_PROVIDER = "android.location.provider.action.GNSS_PROVIDER"; final String mTag; final @Nullable String mAttributionTag; final IBinder mBinder; Loading
services/core/java/com/android/server/location/LocationManagerService.java +17 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.location.LocationManager.GPS_PROVIDER; import static android.location.LocationManager.NETWORK_PROVIDER; import static android.location.LocationRequest.LOW_POWER_EXCEPTIONS; import static android.location.provider.LocationProviderBase.ACTION_FUSED_PROVIDER; import static android.location.provider.LocationProviderBase.ACTION_GNSS_PROVIDER; import static android.location.provider.LocationProviderBase.ACTION_NETWORK_PROVIDER; import static com.android.server.location.LocationPermissions.PERMISSION_COARSE; Loading Loading @@ -439,9 +440,24 @@ public class LocationManagerService extends ILocationManager.Stub implements mGnssManagerService = new GnssManagerService(mContext, mInjector, gnssNative); mGnssManagerService.onSystemReady(); boolean useGnssHardwareProvider = mContext.getResources().getBoolean( com.android.internal.R.bool.config_useGnssHardwareProvider); AbstractLocationProvider gnssProvider = null; if (!useGnssHardwareProvider) { gnssProvider = ProxyLocationProvider.create( mContext, GPS_PROVIDER, ACTION_GNSS_PROVIDER, com.android.internal.R.bool.config_useGnssHardwareProvider, com.android.internal.R.string.config_gnssLocationProviderPackageName); } if (gnssProvider == null) { gnssProvider = mGnssManagerService.getGnssLocationProvider(); } LocationProviderManager gnssManager = new LocationProviderManager(mContext, mInjector, GPS_PROVIDER, mPassiveManager); addLocationProviderManager(gnssManager, mGnssManagerService.getGnssLocationProvider()); addLocationProviderManager(gnssManager, gnssProvider); } // bind to geocoder provider Loading