From fd6e5f0dda50e113db4ccc55338b6c4f09da37a4 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Thu, 21 May 2009 11:28:20 -0400 Subject: location: Replace ILocationCollector interface with new ILocationProvider method This change replaces ILocationCollector with a more general mechanism that passes locations received from a provider to all other providers. The network location provider now uses this to implement the location collector. In the future, this could be used to inject network locations to the GPS as aiding data. This change also removes the now obsolete permission INSTALL_LOCATION_COLLECTOR. Signed-off-by: Mike Lockwood --- .../java/android/location/ILocationCollector.aidl | 36 ---------------------- .../java/android/location/ILocationManager.aidl | 2 -- .../java/android/location/ILocationProvider.aidl | 2 ++ .../java/android/location/LocationManager.java | 21 ------------- 4 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 location/java/android/location/ILocationCollector.aidl (limited to 'location/java/android') diff --git a/location/java/android/location/ILocationCollector.aidl b/location/java/android/location/ILocationCollector.aidl deleted file mode 100644 index b2e1796..0000000 --- a/location/java/android/location/ILocationCollector.aidl +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.Location; - -/** - * Listens for GPS and cell/wifi changes and anonymously uploads to server - * for improving quality of service of NetworkLocationProvider. - * This service is only enabled when the user has enabled the - * network location provider. - * - * {@hide} - */ -oneway interface ILocationCollector { - /** - * Updates GPS location if collection is enabled - * - * @param location location object - */ - void updateLocation(in Location location); -} diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 2c214c9..caf9516 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -20,7 +20,6 @@ import android.app.PendingIntent; import android.location.Address; import android.location.IGeocodeProvider; import android.location.IGpsStatusListener; -import android.location.ILocationCollector; import android.location.ILocationListener; import android.location.ILocationProvider; import android.location.Location; @@ -83,6 +82,5 @@ interface ILocationManager /* for installing external Location Providers */ void installLocationProvider(String name, ILocationProvider provider); - void installLocationCollector(ILocationCollector collector); void installGeocodeProvider(IGeocodeProvider provider); } diff --git a/location/java/android/location/ILocationProvider.aidl b/location/java/android/location/ILocationProvider.aidl index 6c23f83..4fe0494 100644 --- a/location/java/android/location/ILocationProvider.aidl +++ b/location/java/android/location/ILocationProvider.aidl @@ -16,6 +16,7 @@ package android.location; +import android.location.Location; import android.os.Bundle; /** @@ -41,6 +42,7 @@ interface ILocationProvider { void enableLocationTracking(boolean enable); void setMinTime(long minTime); void updateNetworkState(int state); + void updateLocation(in Location location); boolean sendExtraCommand(String command, inout Bundle extras); void addListener(int uid); void removeListener(int uid); diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 872838c..86ea66f 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1279,27 +1279,6 @@ public class LocationManager { } /** - * Installs a location collector. - * - * @param provider Binder interface for the location collector - * - * @return true if the command succeeds. - * - * Requires the android.permission.INSTALL_LOCATION_COLLECTOR permission. - * - * {@hide} - */ - public boolean installLocationCollector(ILocationCollector collector) { - try { - mService.installLocationCollector(collector); - return true; - } catch (RemoteException e) { - Log.e(TAG, "RemoteException in setLocationCollector: ", e); - return false; - } - } - - /** * Installs a geocoder server. * * @param provider Binder interface for the geocoder provider -- cgit v1.1