Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a491b7ab authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Revert removal of GpsStatus APIs

Bug: 126698813
Test: manual
Change-Id: I174d3f4cd21259e59381fc79990005c644380065
parent e756f460
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -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<android.location.GpsSatellite> 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<java.lang.String> 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);
+0 −21
Original line number Diff line number Diff line
@@ -282,24 +282,6 @@ package android.hardware {

package android.location {

  @Deprecated public final class GpsStatus {
    method public int getMaxSatellites();
    method public Iterable<android.location.GpsSatellite> 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);
  }

+0 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import java.util.NoSuchElementException;
 * <p>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 {
+0 −3
Original line number Diff line number Diff line
@@ -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)