From 725a2ea2568046d0cf8322b38086d8d83b3eabac Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 26 May 2021 13:08:54 -0600 Subject: [PATCH] Clean up "Deprecated at Birth" APIs. When APIs are refactored mid-release, they can often be left marked as @Deprecated with the intention of eventually removing them before the SDK is finalized. Well, the time has come to finalize the SDK, so let's clean them up. Bug: 189325658 Test: manual Change-Id: I48e3e1c1306fbaf071e4acfd9e8107e6ad564ffe --- core/api/system-current.txt | 5 ----- core/api/system-removed.txt | 1 + core/api/test-current.txt | 4 ---- location/java/android/location/LocationDeviceConfig.java | 5 ----- location/java/android/location/LocationManager.java | 1 + 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 075bea1bb79a7..7072bbeade29c 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -4930,10 +4930,6 @@ package android.location { field @Deprecated public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; } - public final class LocationDeviceConfig { - field public static final String IGNORE_SETTINGS_ALLOWLIST = "ignore_settings_allowlist"; - } - public class LocationManager { method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void addProviderRequestChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.location.provider.ProviderRequest.ChangedListener); method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void flushGnssBatch(); @@ -4946,7 +4942,6 @@ package android.location { method public boolean isLocationEnabledForUser(@NonNull android.os.UserHandle); method public boolean isProviderEnabledForUser(@NonNull String, @NonNull android.os.UserHandle); method @Deprecated @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@NonNull String); - method @Deprecated @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@Nullable String, @NonNull String); method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@Nullable String, @NonNull String, @Nullable String); method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.UPDATE_APP_OPS_STATS}) public boolean registerGnssBatchedLocationCallback(long, boolean, @NonNull android.location.BatchedLocationCallback, @Nullable android.os.Handler); method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean registerGnssMeasurementsCallback(@NonNull android.location.GnssRequest, @NonNull java.util.concurrent.Executor, @NonNull android.location.GnssMeasurementsEvent.Callback); diff --git a/core/api/system-removed.txt b/core/api/system-removed.txt index 1752e2b3a6147..9a8a493973224 100644 --- a/core/api/system-removed.txt +++ b/core/api/system-removed.txt @@ -135,6 +135,7 @@ package android.location { public class LocationManager { method @Deprecated public boolean addGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener); method @Deprecated public boolean addGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@Nullable String, @NonNull String); method @Deprecated public void removeGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener); method @Deprecated public void removeGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener); method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void setLocationControllerExtraPackage(String); diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 8499b3739528d..2f795f0e103f8 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1360,10 +1360,6 @@ package android.location { method public void setType(int); } - public final class LocationDeviceConfig { - field public static final String IGNORE_SETTINGS_ALLOWLIST = "ignore_settings_allowlist"; - } - public class LocationManager { method @NonNull public String[] getBackgroundThrottlingWhitelist(); method @NonNull public android.os.PackageTagsList getIgnoreSettingsAllowlist(); diff --git a/location/java/android/location/LocationDeviceConfig.java b/location/java/android/location/LocationDeviceConfig.java index 92845745828b2..c55eed9211f7e 100644 --- a/location/java/android/location/LocationDeviceConfig.java +++ b/location/java/android/location/LocationDeviceConfig.java @@ -16,16 +16,11 @@ package android.location; -import android.annotation.SystemApi; -import android.annotation.TestApi; - /** * DeviceConfig keys within the location namespace. * * @hide */ -@SystemApi -@TestApi public final class LocationDeviceConfig { /** diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index f83dc407d8701..ae44c5e345210 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1823,6 +1823,7 @@ public class LocationManager { * @deprecated Use {@link #isProviderPackage(String, String, String)} instead. * * @hide + * @removed */ @Deprecated @SystemApi