summaryrefslogtreecommitdiff
path: root/location/java
diff options
context:
space:
mode:
author David Christie <dnchrist@google.com> 2022-12-12 23:53:40 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-12-12 23:53:40 +0000
commit5c7a3cdb10dd720a09baefa90aa6ce45630cabe4 (patch)
tree7b8bf9c36d606f2868e6de1c46618423e5c2d00f /location/java
parent26d4661c5a77501dabdd511c7576df187fc0e45e (diff)
parentb983a450d00e72935bf08e64f8611015d2a5aa4a (diff)
Merge "Add permission gated provider to access the hardware GPS directly."
Diffstat (limited to 'location/java')
-rw-r--r--location/java/android/location/LocationManager.java15
-rw-r--r--location/java/android/location/provider/LocationProviderBase.java2
2 files changed, 15 insertions, 2 deletions
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 9b81c09f5c5b..3619d3ac5253 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -195,6 +195,21 @@ public class LocationManager {
public static final String GPS_PROVIDER = "gps";
/**
+ * Standard name of the GNSS hardware location provider.
+ *
+ * <p>This provider is similar to {@link LocationManager#GPS_PROVIDER}, but it directly uses the
+ * HAL GNSS implementation and doesn't go through any provider overrides that may exist. This
+ * provider will only be available when the GPS_PROVIDER is overridden with a proxy using {@link
+ * android.location.provider.LocationProviderBase#ACTION_GNSS_PROVIDER}, and is intended only
+ * for use internally by the location provider system.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
+ public static final String GPS_HARDWARE_PROVIDER = "gps_hardware";
+
+ /**
* A special location provider for receiving locations without actively initiating a location
* fix. This location provider is always present.
*
diff --git a/location/java/android/location/provider/LocationProviderBase.java b/location/java/android/location/provider/LocationProviderBase.java
index 5acec79a2d3b..18672b7fe10d 100644
--- a/location/java/android/location/provider/LocationProviderBase.java
+++ b/location/java/android/location/provider/LocationProviderBase.java
@@ -104,8 +104,6 @@ public abstract class LocationProviderBase {
/**
* 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";