diff --git a/api/current.txt b/api/current.txt index 9d32302a753fb..939242bfba3ef 100644 --- a/api/current.txt +++ b/api/current.txt @@ -22835,6 +22835,24 @@ package android.location { method @Deprecated public boolean usedInFix(); } + @Deprecated public final class GpsStatus { + method @Deprecated public int getMaxSatellites(); + method @Deprecated public Iterable getSatellites(); + method @Deprecated public int getTimeToFirstFix(); + field @Deprecated public static final int GPS_EVENT_FIRST_FIX = 3; // 0x3 + field @Deprecated public static final int GPS_EVENT_SATELLITE_STATUS = 4; // 0x4 + field @Deprecated public static final int GPS_EVENT_STARTED = 1; // 0x1 + field @Deprecated public static final int GPS_EVENT_STOPPED = 2; // 0x2 + } + + @Deprecated public static interface GpsStatus.Listener { + method @Deprecated public void onGpsStatusChanged(int); + } + + @Deprecated public static interface GpsStatus.NmeaListener { + method @Deprecated public void onNmeaReceived(long, String); + } + public class Location implements android.os.Parcelable { ctor public Location(String); ctor public Location(android.location.Location); @@ -22903,6 +22921,7 @@ package android.location { } public class LocationManager { + method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean addGpsStatusListener(android.location.GpsStatus.Listener); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean addNmeaListener(@NonNull android.location.OnNmeaMessageListener); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean addNmeaListener(@NonNull android.location.OnNmeaMessageListener, @Nullable android.os.Handler); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void addProximityAlert(double, double, float, long, @NonNull android.app.PendingIntent); @@ -22914,6 +22933,7 @@ package android.location { method @Nullable public String getBestProvider(@NonNull android.location.Criteria, boolean); method @Nullable public String getGnssHardwareModelName(); method public int getGnssYearOfHardware(); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public android.location.GpsStatus getGpsStatus(@Nullable android.location.GpsStatus); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) @Nullable public android.location.Location getLastKnownLocation(@NonNull String); method @Nullable public android.location.LocationProvider getProvider(@NonNull String); method @NonNull public java.util.List getProviders(boolean); @@ -22926,6 +22946,7 @@ package android.location { method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean registerGnssNavigationMessageCallback(@NonNull android.location.GnssNavigationMessage.Callback, @Nullable android.os.Handler); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean registerGnssStatusCallback(@NonNull android.location.GnssStatus.Callback); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean registerGnssStatusCallback(@NonNull android.location.GnssStatus.Callback, @Nullable android.os.Handler); + method @Deprecated public void removeGpsStatusListener(android.location.GpsStatus.Listener); method public void removeNmeaListener(@NonNull android.location.OnNmeaMessageListener); method @RequiresPermission(anyOf={"android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"}, apis="..22") public void removeProximityAlert(@NonNull android.app.PendingIntent); method public void removeTestProvider(@NonNull String); diff --git a/api/removed.txt b/api/removed.txt index 93d06928e3d05..4fe0ed9b53132 100644 --- a/api/removed.txt +++ b/api/removed.txt @@ -282,24 +282,6 @@ package android.hardware { package android.location { - @Deprecated public final class GpsStatus { - method public int getMaxSatellites(); - method public Iterable getSatellites(); - method public int getTimeToFirstFix(); - field public static final int GPS_EVENT_FIRST_FIX = 3; // 0x3 - field public static final int GPS_EVENT_SATELLITE_STATUS = 4; // 0x4 - field public static final int GPS_EVENT_STARTED = 1; // 0x1 - field public static final int GPS_EVENT_STOPPED = 2; // 0x2 - } - - @Deprecated public static interface GpsStatus.Listener { - method public void onGpsStatusChanged(int); - } - - @Deprecated public static interface GpsStatus.NmeaListener { - method public void onNmeaReceived(long, String); - } - public class Location implements android.os.Parcelable { method @Deprecated public void removeBearingAccuracy(); method @Deprecated public void removeSpeedAccuracy(); @@ -307,10 +289,7 @@ package android.location { } public class LocationManager { - method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean addGpsStatusListener(android.location.GpsStatus.Listener); method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean addNmeaListener(android.location.GpsStatus.NmeaListener); - method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public android.location.GpsStatus getGpsStatus(@Nullable android.location.GpsStatus); - method @Deprecated public void removeGpsStatusListener(android.location.GpsStatus.Listener); method @Deprecated public void removeNmeaListener(android.location.GpsStatus.NmeaListener); } diff --git a/location/java/android/location/GpsStatus.java b/location/java/android/location/GpsStatus.java index 4e37654e7c65f..609a15e1be7e0 100644 --- a/location/java/android/location/GpsStatus.java +++ b/location/java/android/location/GpsStatus.java @@ -30,7 +30,6 @@ import java.util.NoSuchElementException; *

This class is used in conjunction with the {@link Listener} interface. * * @deprecated use {@link GnssStatus} and {@link GnssStatus.Callback}. - * @removed */ @Deprecated public final class GpsStatus { @@ -113,7 +112,6 @@ public final class GpsStatus { /** * Used for receiving notifications when GPS status has changed. * @deprecated use {@link GnssStatus.Callback} instead. - * @removed */ @Deprecated public interface Listener { @@ -144,7 +142,6 @@ public final class GpsStatus { * You can implement this interface and call {@link LocationManager#addNmeaListener} * to receive NMEA data from the GPS engine. * @deprecated use {@link OnNmeaMessageListener} instead. - * @removed */ @Deprecated public interface NmeaListener { diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index db6a4d02b04ee..9491ac2d0adc5 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1749,7 +1749,6 @@ public class LocationManager { * * @throws SecurityException if the ACCESS_FINE_LOCATION permission is not present * @deprecated use {@link #registerGnssStatusCallback(GnssStatus.Callback)} instead. - * @removed */ @Deprecated @RequiresPermission(ACCESS_FINE_LOCATION) @@ -1762,7 +1761,6 @@ public class LocationManager { * * @param listener GPS status listener object to remove * @deprecated use {@link #unregisterGnssStatusCallback(GnssStatus.Callback)} instead. - * @removed */ @Deprecated public void removeGpsStatusListener(GpsStatus.Listener listener) {} @@ -2088,7 +2086,6 @@ public class LocationManager { * * @param status object containing GPS status details, or null. * @return status object containing updated GPS status. - * @removed */ @Deprecated @RequiresPermission(ACCESS_FINE_LOCATION)