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

Commit 82c292e0 authored by Laurent Tu's avatar Laurent Tu Committed by Android Git Automerger
Browse files

am 7ab7f538: Hide new location APIs and undeprecate old ones

* commit '7ab7f538':
  Hide new location APIs and undeprecate old ones
parents f3e08f3d 7ab7f538
Loading
Loading
Loading
Loading
+36 −73
Original line number Diff line number Diff line
@@ -10582,7 +10582,7 @@ package android.location {
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public deprecated class Criteria implements android.os.Parcelable {
  public class Criteria implements android.os.Parcelable {
    ctor public Criteria();
    ctor public Criteria(android.location.Criteria);
    method public int describeContents();
@@ -10628,13 +10628,6 @@ package android.location {
    method public static boolean isPresent();
  }
  public final class Geofence implements android.os.Parcelable {
    method public static android.location.Geofence createCircle(double, double, float);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public final class GpsSatellite {
    method public float getAzimuth();
    method public float getElevation();
@@ -10680,7 +10673,7 @@ package android.location {
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public deprecated java.lang.String getProvider();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public long getTime();
    method public boolean hasAccuracy();
@@ -10718,57 +10711,51 @@ package android.location {
  }
  public class LocationManager {
    method public void addGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
    method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
    method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
    method public deprecated void addProximityAlert(double, double, float, long, android.app.PendingIntent);
    method public deprecated void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
    method public deprecated void clearTestProviderEnabled(java.lang.String);
    method public deprecated void clearTestProviderLocation(java.lang.String);
    method public deprecated void clearTestProviderStatus(java.lang.String);
    method public deprecated java.util.List<java.lang.String> getAllProviders();
    method public deprecated java.lang.String getBestProvider(android.location.Criteria, boolean);
    method public void addProximityAlert(double, double, float, long, android.app.PendingIntent);
    method public void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
    method public void clearTestProviderEnabled(java.lang.String);
    method public void clearTestProviderLocation(java.lang.String);
    method public void clearTestProviderStatus(java.lang.String);
    method public java.util.List<java.lang.String> getAllProviders();
    method public java.lang.String getBestProvider(android.location.Criteria, boolean);
    method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
    method public deprecated android.location.Location getLastKnownLocation(java.lang.String);
    method public android.location.Location getLastLocation();
    method public deprecated android.location.LocationProvider getProvider(java.lang.String);
    method public deprecated java.util.List<java.lang.String> getProviders(boolean);
    method public deprecated java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
    method public deprecated boolean isProviderEnabled(java.lang.String);
    method public void removeAllGeofences(android.app.PendingIntent);
    method public void removeGeofence(android.location.Geofence, android.app.PendingIntent);
    method public android.location.Location getLastKnownLocation(java.lang.String);
    method public android.location.LocationProvider getProvider(java.lang.String);
    method public java.util.List<java.lang.String> getProviders(boolean);
    method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
    method public boolean isProviderEnabled(java.lang.String);
    method public void removeGpsStatusListener(android.location.GpsStatus.Listener);
    method public void removeNmeaListener(android.location.GpsStatus.NmeaListener);
    method public deprecated void removeProximityAlert(android.app.PendingIntent);
    method public deprecated void removeTestProvider(java.lang.String);
    method public void removeProximityAlert(android.app.PendingIntent);
    method public void removeTestProvider(java.lang.String);
    method public void removeUpdates(android.location.LocationListener);
    method public void removeUpdates(android.app.PendingIntent);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
    method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
    method public void requestLocationUpdates(android.location.LocationRequest, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(android.location.LocationRequest, android.app.PendingIntent);
    method public deprecated void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
    method public deprecated void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
    method public deprecated boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
    method public deprecated void setTestProviderEnabled(java.lang.String, boolean);
    method public deprecated void setTestProviderLocation(java.lang.String, android.location.Location);
    method public deprecated void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
    field public static final deprecated java.lang.String GPS_PROVIDER = "gps";
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
    method public void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
    method public void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
    method public boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
    method public void setTestProviderEnabled(java.lang.String, boolean);
    method public void setTestProviderLocation(java.lang.String, android.location.Location);
    method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
    field public static final java.lang.String GPS_PROVIDER = "gps";
    field public static final java.lang.String KEY_LOCATION_CHANGED = "location";
    field public static final deprecated java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
    field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
    field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering";
    field public static final deprecated java.lang.String KEY_STATUS_CHANGED = "status";
    field public static final deprecated java.lang.String NETWORK_PROVIDER = "network";
    field public static final deprecated java.lang.String PASSIVE_PROVIDER = "passive";
    field public static final deprecated java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
    field public static final java.lang.String KEY_STATUS_CHANGED = "status";
    field public static final java.lang.String NETWORK_PROVIDER = "network";
    field public static final java.lang.String PASSIVE_PROVIDER = "passive";
    field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
  }
  public deprecated class LocationProvider {
  public class LocationProvider {
    method public int getAccuracy();
    method public java.lang.String getName();
    method public int getPowerRequirement();
@@ -10785,30 +10772,6 @@ package android.location {
    field public static final int TEMPORARILY_UNAVAILABLE = 1; // 0x1
  }
  public final class LocationRequest implements android.os.Parcelable {
    method public static android.location.LocationRequest create();
    method public int describeContents();
    method public long getExpireAt();
    method public long getFastestInterval();
    method public long getInterval();
    method public int getNumUpdates();
    method public int getQuality();
    method public android.location.LocationRequest setExpireAt(long);
    method public android.location.LocationRequest setExpireIn(long);
    method public android.location.LocationRequest setFastestInterval(long);
    method public android.location.LocationRequest setInterval(long);
    method public android.location.LocationRequest setNumUpdates(int);
    method public android.location.LocationRequest setQuality(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACCURACY_BLOCK = 102; // 0x66
    field public static final int ACCURACY_CITY = 104; // 0x68
    field public static final int ACCURACY_FINE = 100; // 0x64
    field public static final android.os.Parcelable.Creator CREATOR;
    field public static final int POWER_HIGH = 203; // 0xcb
    field public static final int POWER_LOW = 201; // 0xc9
    field public static final int POWER_NONE = 200; // 0xc8
  }
}
package android.media {
+36 −73
Original line number Diff line number Diff line
@@ -10582,7 +10582,7 @@ package android.location {
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public deprecated class Criteria implements android.os.Parcelable {
  public class Criteria implements android.os.Parcelable {
    ctor public Criteria();
    ctor public Criteria(android.location.Criteria);
    method public int describeContents();
@@ -10628,13 +10628,6 @@ package android.location {
    method public static boolean isPresent();
  }
  public final class Geofence implements android.os.Parcelable {
    method public static android.location.Geofence createCircle(double, double, float);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public final class GpsSatellite {
    method public float getAzimuth();
    method public float getElevation();
@@ -10680,7 +10673,7 @@ package android.location {
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public deprecated java.lang.String getProvider();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public long getTime();
    method public boolean hasAccuracy();
@@ -10718,57 +10711,51 @@ package android.location {
  }
  public class LocationManager {
    method public void addGeofence(android.location.LocationRequest, android.location.Geofence, android.app.PendingIntent);
    method public boolean addGpsStatusListener(android.location.GpsStatus.Listener);
    method public boolean addNmeaListener(android.location.GpsStatus.NmeaListener);
    method public deprecated void addProximityAlert(double, double, float, long, android.app.PendingIntent);
    method public deprecated void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
    method public deprecated void clearTestProviderEnabled(java.lang.String);
    method public deprecated void clearTestProviderLocation(java.lang.String);
    method public deprecated void clearTestProviderStatus(java.lang.String);
    method public deprecated java.util.List<java.lang.String> getAllProviders();
    method public deprecated java.lang.String getBestProvider(android.location.Criteria, boolean);
    method public void addProximityAlert(double, double, float, long, android.app.PendingIntent);
    method public void addTestProvider(java.lang.String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
    method public void clearTestProviderEnabled(java.lang.String);
    method public void clearTestProviderLocation(java.lang.String);
    method public void clearTestProviderStatus(java.lang.String);
    method public java.util.List<java.lang.String> getAllProviders();
    method public java.lang.String getBestProvider(android.location.Criteria, boolean);
    method public android.location.GpsStatus getGpsStatus(android.location.GpsStatus);
    method public deprecated android.location.Location getLastKnownLocation(java.lang.String);
    method public android.location.Location getLastLocation();
    method public deprecated android.location.LocationProvider getProvider(java.lang.String);
    method public deprecated java.util.List<java.lang.String> getProviders(boolean);
    method public deprecated java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
    method public deprecated boolean isProviderEnabled(java.lang.String);
    method public void removeAllGeofences(android.app.PendingIntent);
    method public void removeGeofence(android.location.Geofence, android.app.PendingIntent);
    method public android.location.Location getLastKnownLocation(java.lang.String);
    method public android.location.LocationProvider getProvider(java.lang.String);
    method public java.util.List<java.lang.String> getProviders(boolean);
    method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
    method public boolean isProviderEnabled(java.lang.String);
    method public void removeGpsStatusListener(android.location.GpsStatus.Listener);
    method public void removeNmeaListener(android.location.GpsStatus.NmeaListener);
    method public deprecated void removeProximityAlert(android.app.PendingIntent);
    method public deprecated void removeTestProvider(java.lang.String);
    method public void removeProximityAlert(android.app.PendingIntent);
    method public void removeTestProvider(java.lang.String);
    method public void removeUpdates(android.location.LocationListener);
    method public void removeUpdates(android.app.PendingIntent);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
    method public deprecated void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
    method public void requestLocationUpdates(android.location.LocationRequest, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(android.location.LocationRequest, android.app.PendingIntent);
    method public deprecated void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public deprecated void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
    method public deprecated void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
    method public deprecated boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
    method public deprecated void setTestProviderEnabled(java.lang.String, boolean);
    method public deprecated void setTestProviderLocation(java.lang.String, android.location.Location);
    method public deprecated void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
    field public static final deprecated java.lang.String GPS_PROVIDER = "gps";
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener);
    method public void requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestLocationUpdates(java.lang.String, long, float, android.app.PendingIntent);
    method public void requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent);
    method public void requestSingleUpdate(java.lang.String, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper);
    method public void requestSingleUpdate(java.lang.String, android.app.PendingIntent);
    method public void requestSingleUpdate(android.location.Criteria, android.app.PendingIntent);
    method public boolean sendExtraCommand(java.lang.String, java.lang.String, android.os.Bundle);
    method public void setTestProviderEnabled(java.lang.String, boolean);
    method public void setTestProviderLocation(java.lang.String, android.location.Location);
    method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
    field public static final java.lang.String GPS_PROVIDER = "gps";
    field public static final java.lang.String KEY_LOCATION_CHANGED = "location";
    field public static final deprecated java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
    field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
    field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering";
    field public static final deprecated java.lang.String KEY_STATUS_CHANGED = "status";
    field public static final deprecated java.lang.String NETWORK_PROVIDER = "network";
    field public static final deprecated java.lang.String PASSIVE_PROVIDER = "passive";
    field public static final deprecated java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
    field public static final java.lang.String KEY_STATUS_CHANGED = "status";
    field public static final java.lang.String NETWORK_PROVIDER = "network";
    field public static final java.lang.String PASSIVE_PROVIDER = "passive";
    field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
  }
  public deprecated class LocationProvider {
  public class LocationProvider {
    method public int getAccuracy();
    method public java.lang.String getName();
    method public int getPowerRequirement();
@@ -10785,30 +10772,6 @@ package android.location {
    field public static final int TEMPORARILY_UNAVAILABLE = 1; // 0x1
  }
  public final class LocationRequest implements android.os.Parcelable {
    method public static android.location.LocationRequest create();
    method public int describeContents();
    method public long getExpireAt();
    method public long getFastestInterval();
    method public long getInterval();
    method public int getNumUpdates();
    method public int getQuality();
    method public android.location.LocationRequest setExpireAt(long);
    method public android.location.LocationRequest setExpireIn(long);
    method public android.location.LocationRequest setFastestInterval(long);
    method public android.location.LocationRequest setInterval(long);
    method public android.location.LocationRequest setNumUpdates(int);
    method public android.location.LocationRequest setQuality(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ACCURACY_BLOCK = 102; // 0x66
    field public static final int ACCURACY_CITY = 104; // 0x68
    field public static final int ACCURACY_FINE = 100; // 0x64
    field public static final android.os.Parcelable.Creator CREATOR;
    field public static final int POWER_HIGH = 203; // 0xcb
    field public static final int POWER_LOW = 201; // 0xc9
    field public static final int POWER_NONE = 200; // 0xc8
  }
}
package android.media {
+0 −4
Original line number Diff line number Diff line
@@ -24,11 +24,7 @@ import android.os.Parcelable;
 * location provider.  Providers maybe ordered according to accuracy,
 * power usage, ability to report altitude, speed,
 * and bearing, and monetary cost.
 *
 * @deprecated use {@link LocationRequest} instead, and also see notes
 * at {@link LocationManager}
 */
@Deprecated
public class Criteria implements Parcelable {
    /**
     * A constant indicating that the application does not choose to
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.os.Parcelable;
 * Represents a geographical boundary, also known as a geofence.
 *
 * <p>Currently only circular geofences are supported and they do not support altitude changes.
 *
 * @hide
 */
public final class Geofence implements Parcelable {
    /** @hide */
+0 −9
Original line number Diff line number Diff line
@@ -466,17 +466,8 @@ public class Location implements Parcelable {
    /**
     * Returns the name of the provider that generated this fix.
     *
     * <p class="note">At API version 17 we deprecated {@link LocationProvider}
     * and all API methods that request a provider by name. The new API methods
     * will produce locations that could come from different sources, and even
     * locations that are fused from several sources. So you should generally
     * not care what provider is associated with a location object.
     *
     * @return the provider, or null if it has not been set
     *
     * @deprecated locations can now be sourced from many providers, or even fused
     */
    @Deprecated
    public String getProvider() {
        return mProvider;
    }
Loading