diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index b22a83dc289d3..ef9df6609bb93 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -102,6 +102,14 @@ package android.hardware.usb { } +package android.location { + + public class LocationManager { + method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public boolean injectLocation(@NonNull android.location.Location); + } + +} + package android.media { public class AudioManager { diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 526b84e85e383..ccd979c095ce3 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1569,6 +1569,7 @@ public class LocationManager { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(allOf = {LOCATION_HARDWARE, ACCESS_FINE_LOCATION}) public boolean injectLocation(@NonNull Location location) { Preconditions.checkArgument(location != null, "invalid null location");