diff options
author | Nick Pelly <npelly@google.com> | 2012-08-10 15:25:16 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2012-08-10 15:27:38 -0700 |
commit | 3914e4b7d12b014f73085cd6e34b6fd69ea26226 (patch) | |
tree | 11dce06e9b6e602183cd024e709ec476e02defd5 | |
parent | 6fa9ad4afcd762aea519ff61811386c23d18ddb2 (diff) | |
download | frameworks_base-3914e4b7d12b014f73085cd6e34b6fd69ea26226.zip frameworks_base-3914e4b7d12b014f73085cd6e34b6fd69ea26226.tar.gz frameworks_base-3914e4b7d12b014f73085cd6e34b6fd69ea26226.tar.bz2 |
Remove LocationManager#getLastKnownLocation(Criteria).
This was never a public API, so we don't need to follow
an orderly deprecation. And it breaks a CTS test:
cts/tests/tests/location/src/android/location/cts/LocationManagerTest.java:521: reference to getLastKnownLocation is ambiguous, both method getLastKnownLocation(java.lang.String) in android.location.LocationManager and method getLastKnownLocation(android.location.Criteria) in android.location.LocationManager match
mManager.getLastKnownLocation(null);
^
Change-Id: I503267e4fa577ce4bf684239da777f11b0e511f5
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | location/java/android/location/LocationManager.java | 30 |
2 files changed, 0 insertions, 31 deletions
diff --git a/api/current.txt b/api/current.txt index e7dcf05..d2f1e4e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -10598,7 +10598,6 @@ package android.location { method public deprecated 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 deprecated android.location.Location getLastKnownLocation(android.location.Criteria); method public android.location.Location getLastLocation(android.location.LocationRequest); method public deprecated android.location.LocationProvider getProvider(java.lang.String); method public deprecated java.util.List<java.lang.String> getProviders(boolean); diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 083b900..5f87c84 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1243,36 +1243,6 @@ public class LocationManager { } } - /** - * Return the last know Location that satisfies the given - * criteria. This can be done without starting the provider. - * Note that this location could - * be out-of-date, for example if the device was turned off and - * moved to another location. - * - * <p> If no location is found that satisfies the criteria, null is returned - * - * @param criteria location criteria - * @return the last known location that satisfies criteria, or null - * - * @throws SecurityException if no suitable permission is present - * @throws IllegalArgumentException if criteria is null - * @deprecated use the {@link LocationRequest} class instead - */ - @Deprecated - public Location getLastKnownLocation(Criteria criteria) { - checkCriteria(criteria); - - LocationRequest request = LocationRequest.createFromDeprecatedCriteria( - criteria, 0, 0, true); - try { - return mService.getLastLocation(request); - } catch (RemoteException e) { - Log.e(TAG, "RemoteException", e); - return null; - } - } - // Mock provider support /** |