diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2009-04-22 17:12:34 -0700 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-04-22 17:12:34 -0700 |
| commit | 74008f608af0c567456d37e63d48643689388c74 (patch) | |
| tree | 02354593bed51d5c4bb0ac5f9b44032034cbbaaf /location/java/android | |
| parent | 6fc52c4928ec8a658d7eb0b7881fcbc879aeb18c (diff) | |
| parent | 644cf62660c87a9b8d5bcb22412cc2ad2aeea291 (diff) | |
| download | frameworks_base-74008f608af0c567456d37e63d48643689388c74.zip frameworks_base-74008f608af0c567456d37e63d48643689388c74.tar.gz frameworks_base-74008f608af0c567456d37e63d48643689388c74.tar.bz2 | |
Merge donut into master
Diffstat (limited to 'location/java/android')
5 files changed, 73 insertions, 16 deletions
diff --git a/location/java/android/location/Geocoder.java b/location/java/android/location/Geocoder.java index 53e46b7..2ce1273 100644 --- a/location/java/android/location/Geocoder.java +++ b/location/java/android/location/Geocoder.java @@ -36,11 +36,11 @@ import java.util.List; * coordinate into a (partial) address. The amount of detail in a * reverse geocoded location description may vary, for example one * might contain the full street address of the closest building, while - * another might contain only a city name and postal code. + * another might contain only a city name and postal code. * * The Geocoder class requires a backend service that is not included in - * the core android framework. The Geocoder query methods will return an - * empty list if there no backend service in the platform. + * the core android framework. The Geocoder query methods will return an + * empty list if there no backend service in the platform. */ public final class Geocoder { private static final String TAG = "Geocoder"; diff --git a/location/java/android/location/IGeocodeProvider.aidl b/location/java/android/location/IGeocodeProvider.aidl new file mode 100644 index 0000000..e79e8d2 --- /dev/null +++ b/location/java/android/location/IGeocodeProvider.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.location; + +import android.location.Address; + +/** + * An interface for location providers implementing the Geocoder services. + * + * {@hide} + */ +interface IGeocodeProvider { + + String getFromLocation(double latitude, double longitude, int maxResults, + String language, String country, String variant, String appName, out List<Address> addrs); + + String getFromLocationName(String locationName, + double lowerLeftLatitude, double lowerLeftLongitude, + double upperRightLatitude, double upperRightLongitude, int maxResults, + String language, String country, String variant, String appName, out List<Address> addrs); +} diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 86bd8b6..7d35814 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -18,6 +18,7 @@ package android.location; import android.app.PendingIntent; import android.location.Address; +import android.location.IGeocodeProvider; import android.location.IGpsStatusListener; import android.location.ILocationCollector; import android.location.ILocationListener; @@ -77,7 +78,8 @@ interface ILocationManager void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime); void clearTestProviderStatus(String provider); - /* for installing Network Location Provider */ + /* for installing external Location Providers */ void setNetworkLocationProvider(ILocationProvider provider); void setLocationCollector(ILocationCollector collector); + void setGeocodeProvider(IGeocodeProvider provider); } diff --git a/location/java/android/location/ILocationProvider.aidl b/location/java/android/location/ILocationProvider.aidl index 6f9daff..82533a5 100644 --- a/location/java/android/location/ILocationProvider.aidl +++ b/location/java/android/location/ILocationProvider.aidl @@ -16,7 +16,6 @@ package android.location; -import android.location.Address; import android.os.Bundle; /** @@ -47,15 +46,8 @@ interface ILocationProvider { void setMinTime(long minTime); void updateNetworkState(int state); boolean sendExtraCommand(String command, inout Bundle extras); - - /* the following are only used for NetworkLocationProvider */ - void updateCellLockStatus(boolean acquired); - void addListener(in String[] applications); - void removeListener(in String[] applications); - String getFromLocation(double latitude, double longitude, int maxResults, - String language, String country, String variant, String appName, out List<Address> addrs); - String getFromLocationName(String locationName, - double lowerLeftLatitude, double lowerLeftLongitude, - double upperRightLatitude, double upperRightLongitude, int maxResults, - String language, String country, String variant, String appName, out List<Address> addrs); + void addListener(int uid); + void removeListener(int uid); + void wakeLockAcquired(); + void wakeLockReleased(); } diff --git a/location/java/android/location/LocationProviderImpl.java b/location/java/android/location/LocationProviderImpl.java index 2a9199e..a20aa3c 100644 --- a/location/java/android/location/LocationProviderImpl.java +++ b/location/java/android/location/LocationProviderImpl.java @@ -249,4 +249,32 @@ public abstract class LocationProviderImpl extends LocationProvider { public boolean sendExtraCommand(String command, Bundle extras) { return false; } + + /** + * Informs the location provider when a new client is listening for location information + * + * @param uid the uid of the client proces + */ + public void addListener(int uid) { + } + + /** + * Informs the location provider when a client is no longer listening for location information + * + * @param uid the uid of the client proces + */ + public void removeListener(int uid) { + } + + /** + * Informs the location provider when the location manager service has acquired its wake lock + */ + public void wakeLockAcquired() { + } + + /** + * Informs the location provider when the location manager service has released its wake lock + */ + public void wakeLockReleased() { + } } |
