diff options
| -rw-r--r-- | config/hiddenapi-light-greylist.txt | 31 | ||||
| -rw-r--r-- | config/hiddenapi-vendor-list.txt | 1 | ||||
| -rw-r--r-- | location/java/android/location/Country.java | 4 | ||||
| -rw-r--r-- | location/java/android/location/CountryDetector.java | 5 | ||||
| -rw-r--r-- | location/java/android/location/CountryListener.java | 3 | ||||
| -rw-r--r-- | location/java/android/location/GeocoderParams.java | 3 | ||||
| -rw-r--r-- | location/java/android/location/Geofence.java | 2 | ||||
| -rw-r--r-- | location/java/android/location/GpsStatus.java | 2 | ||||
| -rw-r--r-- | location/java/android/location/Location.java | 4 | ||||
| -rw-r--r-- | location/java/android/location/LocationManager.java | 4 | ||||
| -rw-r--r-- | location/java/android/location/LocationRequest.java | 15 |
11 files changed, 42 insertions, 32 deletions
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt index 1320b75823f5..bc4ed1543d40 100644 --- a/config/hiddenapi-light-greylist.txt +++ b/config/hiddenapi-light-greylist.txt @@ -1833,18 +1833,6 @@ Landroid/icu/util/UResourceBundle;->getString()Ljava/lang/String; Landroid/icu/util/UResourceBundle;->getType()I Landroid/icu/util/UResourceBundleIterator;->hasNext()Z Landroid/icu/util/UResourceBundleIterator;->next()Landroid/icu/util/UResourceBundle; -Landroid/location/Country;-><init>(Ljava/lang/String;I)V -Landroid/location/Country;->getCountryIso()Ljava/lang/String; -Landroid/location/Country;->getSource()I -Landroid/location/CountryDetector;-><init>(Landroid/location/ICountryDetector;)V -Landroid/location/CountryDetector;->addCountryListener(Landroid/location/CountryListener;Landroid/os/Looper;)V -Landroid/location/CountryDetector;->detectCountry()Landroid/location/Country; -Landroid/location/CountryDetector;->removeCountryListener(Landroid/location/CountryListener;)V -Landroid/location/CountryListener;->onCountryDetected(Landroid/location/Country;)V -Landroid/location/GeocoderParams;->getClientPackage()Ljava/lang/String; -Landroid/location/GeocoderParams;->getLocale()Ljava/util/Locale; -Landroid/location/Geofence;->CREATOR:Landroid/os/Parcelable$Creator; -Landroid/location/GpsStatus;->setTimeToFirstFix(I)V Landroid/location/ICountryDetector$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ICountryDetector; Landroid/location/ICountryListener$Stub;-><init>()V Landroid/location/IGeocodeProvider$Stub;-><init>()V @@ -1863,25 +1851,6 @@ Landroid/location/ILocationManager$Stub;-><init>()V Landroid/location/ILocationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationManager; Landroid/location/ILocationManager$Stub;->TRANSACTION_getAllProviders:I Landroid/location/ILocationManager;->getAllProviders()Ljava/util/List; -Landroid/location/Location;->mElapsedRealtimeNanos:J -Landroid/location/Location;->mProvider:Ljava/lang/String; -Landroid/location/LocationManager;->mService:Landroid/location/ILocationManager; -Landroid/location/LocationManager;->requestLocationUpdates(Landroid/location/LocationRequest;Landroid/location/LocationListener;Landroid/os/Looper;Landroid/app/PendingIntent;)V -Landroid/location/LocationManager;->sendNiResponse(II)Z -Landroid/location/LocationRequest;->checkDisplacement(F)V -Landroid/location/LocationRequest;->checkInterval(J)V -Landroid/location/LocationRequest;->checkProvider(Ljava/lang/String;)V -Landroid/location/LocationRequest;->checkQuality(I)V -Landroid/location/LocationRequest;->mExpireAt:J -Landroid/location/LocationRequest;->mExplicitFastestInterval:Z -Landroid/location/LocationRequest;->mFastestInterval:J -Landroid/location/LocationRequest;->mHideFromAppOps:Z -Landroid/location/LocationRequest;->mInterval:J -Landroid/location/LocationRequest;->mNumUpdates:I -Landroid/location/LocationRequest;->mProvider:Ljava/lang/String; -Landroid/location/LocationRequest;->mQuality:I -Landroid/location/LocationRequest;->mSmallestDisplacement:F -Landroid/location/LocationRequest;->mWorkSource:Landroid/os/WorkSource; Landroid/media/AmrInputStream;-><init>(Ljava/io/InputStream;)V Landroid/media/AsyncPlayer;->setUsesWakeLock(Landroid/content/Context;)V Landroid/media/AudioAttributes$Builder;->addTag(Ljava/lang/String;)Landroid/media/AudioAttributes$Builder; diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt index 38a217055d98..2808166f7a5b 100644 --- a/config/hiddenapi-vendor-list.txt +++ b/config/hiddenapi-vendor-list.txt @@ -90,7 +90,6 @@ Landroid/location/ILocationManager;->getNetworkProviderPackage()Ljava/lang/Strin Landroid/location/ILocationManager;->reportLocation(Landroid/location/Location;Z)V Landroid/location/INetInitiatedListener$Stub;-><init>()V Landroid/location/INetInitiatedListener;->sendNiResponse(II)Z -Landroid/location/Location;->setExtraLocation(Ljava/lang/String;Landroid/location/Location;)V Landroid/media/AudioManager;->registerAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V Landroid/media/AudioManager;->unregisterAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V Landroid/media/AudioSystem;->checkAudioFlinger()I diff --git a/location/java/android/location/Country.java b/location/java/android/location/Country.java index 7c1485d88a3e..6f82b7849a82 100644 --- a/location/java/android/location/Country.java +++ b/location/java/android/location/Country.java @@ -16,6 +16,7 @@ package android.location; +import android.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; @@ -78,6 +79,7 @@ public class Country implements Parcelable { * <li>{@link #COUNTRY_SOURCE_LOCALE}</li> * </ul> */ + @UnsupportedAppUsage public Country(final String countryIso, final int source) { if (countryIso == null || source < COUNTRY_SOURCE_NETWORK || source > COUNTRY_SOURCE_LOCALE) { @@ -107,6 +109,7 @@ public class Country implements Parcelable { /** * @return the ISO 3166-1 two letters country code */ + @UnsupportedAppUsage public final String getCountryIso() { return mCountryIso; } @@ -121,6 +124,7 @@ public class Country implements Parcelable { * <li>{@link #COUNTRY_SOURCE_LOCALE}</li> * </ul> */ + @UnsupportedAppUsage public final int getSource() { return mSource; } diff --git a/location/java/android/location/CountryDetector.java b/location/java/android/location/CountryDetector.java index ec6dfb713b10..119d1e0071e5 100644 --- a/location/java/android/location/CountryDetector.java +++ b/location/java/android/location/CountryDetector.java @@ -19,6 +19,7 @@ package android.location; import java.util.HashMap; import android.annotation.SystemService; +import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.Handler; import android.os.Looper; @@ -87,6 +88,7 @@ public class CountryDetector { * create an instance of this class is using the factory * Context.getSystemService. */ + @UnsupportedAppUsage public CountryDetector(ICountryDetector service) { mService = service; mListeners = new HashMap<CountryListener, ListenerTransport>(); @@ -98,6 +100,7 @@ public class CountryDetector { * @return the country if it is available immediately, otherwise null will * be returned. */ + @UnsupportedAppUsage public Country detectCountry() { try { return mService.detectCountry(); @@ -116,6 +119,7 @@ public class CountryDetector { * implement the callback mechanism. If looper is null then the * callbacks will be called on the main thread. */ + @UnsupportedAppUsage public void addCountryListener(CountryListener listener, Looper looper) { synchronized (mListeners) { if (!mListeners.containsKey(listener)) { @@ -133,6 +137,7 @@ public class CountryDetector { /** * Remove the listener */ + @UnsupportedAppUsage public void removeCountryListener(CountryListener listener) { synchronized (mListeners) { ListenerTransport transport = mListeners.get(listener); diff --git a/location/java/android/location/CountryListener.java b/location/java/android/location/CountryListener.java index e36db412eaec..70a83c5acdd9 100644 --- a/location/java/android/location/CountryListener.java +++ b/location/java/android/location/CountryListener.java @@ -16,6 +16,8 @@ package android.location; +import android.annotation.UnsupportedAppUsage; + /** * The listener for receiving the notification when the country is detected or * changed @@ -26,5 +28,6 @@ public interface CountryListener { /** * @param country the changed or detected country. */ + @UnsupportedAppUsage void onCountryDetected(Country country); } diff --git a/location/java/android/location/GeocoderParams.java b/location/java/android/location/GeocoderParams.java index 174fe3e0af2e..d90e4b528f31 100644 --- a/location/java/android/location/GeocoderParams.java +++ b/location/java/android/location/GeocoderParams.java @@ -16,6 +16,7 @@ package android.location; +import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.Parcel; import android.os.Parcelable; @@ -53,6 +54,7 @@ public class GeocoderParams implements Parcelable { /** * returns the Geocoder's locale */ + @UnsupportedAppUsage public Locale getLocale() { return mLocale; } @@ -60,6 +62,7 @@ public class GeocoderParams implements Parcelable { /** * returns the package name of the Geocoder's client */ + @UnsupportedAppUsage public String getClientPackage() { return mPackageName; } diff --git a/location/java/android/location/Geofence.java b/location/java/android/location/Geofence.java index 5de779a29cdd..ed2aa64879aa 100644 --- a/location/java/android/location/Geofence.java +++ b/location/java/android/location/Geofence.java @@ -16,6 +16,7 @@ package android.location; +import android.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; @@ -98,6 +99,7 @@ public final class Geofence implements Parcelable { } } + @UnsupportedAppUsage public static final Parcelable.Creator<Geofence> CREATOR = new Parcelable.Creator<Geofence>() { @Override public Geofence createFromParcel(Parcel in) { diff --git a/location/java/android/location/GpsStatus.java b/location/java/android/location/GpsStatus.java index b601cde35305..d90a597b1cbb 100644 --- a/location/java/android/location/GpsStatus.java +++ b/location/java/android/location/GpsStatus.java @@ -16,6 +16,7 @@ package android.location; +import android.annotation.UnsupportedAppUsage; import android.util.SparseArray; import java.util.Iterator; @@ -206,6 +207,7 @@ public final class GpsStatus { status.mAzimuths); } + @UnsupportedAppUsage void setTimeToFirstFix(int ttff) { mTimeToFirstFix = ttff; } diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java index 684cafa14005..70a97e1f7da0 100644 --- a/location/java/android/location/Location.java +++ b/location/java/android/location/Location.java @@ -18,6 +18,7 @@ package android.location; import android.annotation.SystemApi; import android.annotation.TestApi; +import android.annotation.UnsupportedAppUsage; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; @@ -123,8 +124,10 @@ public class Location implements Parcelable { } }; + @UnsupportedAppUsage private String mProvider; private long mTime = 0; + @UnsupportedAppUsage private long mElapsedRealtimeNanos = 0; private double mLatitude = 0.0; private double mLongitude = 0.0; @@ -1156,6 +1159,7 @@ public class Location implements Parcelable { * @param value the Location to attach * @hide */ + @UnsupportedAppUsage public void setExtraLocation(String key, Location value) { if (mExtras == null) { mExtras = new Bundle(); diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 30a07ef94b06..b5d94315f97f 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -29,6 +29,7 @@ import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; +import android.annotation.UnsupportedAppUsage; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; @@ -68,6 +69,7 @@ public class LocationManager { private static final String TAG = "LocationManager"; private final Context mContext; + @UnsupportedAppUsage private final ILocationManager mService; private final GnssMeasurementCallbackTransport mGnssMeasurementCallbackTransport; private final GnssNavigationMessageCallbackTransport mGnssNavigationMessageCallbackTransport; @@ -1004,6 +1006,7 @@ public class LocationManager { } } + @UnsupportedAppUsage private void requestLocationUpdates(LocationRequest request, LocationListener listener, Looper looper, PendingIntent intent) { @@ -2328,6 +2331,7 @@ public class LocationManager { * * @hide */ + @UnsupportedAppUsage public boolean sendNiResponse(int notifId, int userResponse) { try { return mService.sendNiResponse(notifId, userResponse); diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java index 96a0817ae561..2d7f7e309004 100644 --- a/location/java/android/location/LocationRequest.java +++ b/location/java/android/location/LocationRequest.java @@ -17,6 +17,7 @@ package android.location; import android.annotation.SystemApi; +import android.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; @@ -141,16 +142,26 @@ public final class LocationRequest implements Parcelable { */ private static final double FASTEST_INTERVAL_FACTOR = 6.0; // 6x + @UnsupportedAppUsage private int mQuality = POWER_LOW; + @UnsupportedAppUsage private long mInterval = 60 * 60 * 1000; // 60 minutes + @UnsupportedAppUsage private long mFastestInterval = (long) (mInterval / FASTEST_INTERVAL_FACTOR); // 10 minutes + @UnsupportedAppUsage private boolean mExplicitFastestInterval = false; + @UnsupportedAppUsage private long mExpireAt = Long.MAX_VALUE; // no expiry + @UnsupportedAppUsage private int mNumUpdates = Integer.MAX_VALUE; // no expiry + @UnsupportedAppUsage private float mSmallestDisplacement = 0.0f; // meters + @UnsupportedAppUsage private WorkSource mWorkSource = null; + @UnsupportedAppUsage private boolean mHideFromAppOps = false; // True if this request shouldn't be counted by AppOps + @UnsupportedAppUsage private String mProvider = LocationManager.FUSED_PROVIDER; // for deprecated APIs that explicitly request a provider @@ -592,12 +603,14 @@ public final class LocationRequest implements Parcelable { return mHideFromAppOps; } + @UnsupportedAppUsage private static void checkInterval(long millis) { if (millis < 0) { throw new IllegalArgumentException("invalid interval: " + millis); } } + @UnsupportedAppUsage private static void checkQuality(int quality) { switch (quality) { case ACCURACY_FINE: @@ -612,12 +625,14 @@ public final class LocationRequest implements Parcelable { } } + @UnsupportedAppUsage private static void checkDisplacement(float meters) { if (meters < 0.0f) { throw new IllegalArgumentException("invalid displacement: " + meters); } } + @UnsupportedAppUsage private static void checkProvider(String name) { if (name == null) { throw new IllegalArgumentException("invalid provider: " + name); |