summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-21 09:42:38 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-21 09:42:38 -0700
commit9b1e1400df4c6c4b69985f164097f0c842dd796f (patch)
treecae61f8f495e8a93dcc0ffdc887e7445c46fae70 /location
parenta59fa9b6cba9cae0f7d02e240dbd10603cc127a5 (diff)
parent8c690ea9976d644db3c96eddbbbd2d50eac56913 (diff)
downloadframeworks_base-9b1e1400df4c6c4b69985f164097f0c842dd796f.zip
frameworks_base-9b1e1400df4c6c4b69985f164097f0c842dd796f.tar.gz
frameworks_base-9b1e1400df4c6c4b69985f164097f0c842dd796f.tar.bz2
am 8c690ea9: Merge change 2182 into donut
Merge commit '8c690ea9976d644db3c96eddbbbd2d50eac56913' * commit '8c690ea9976d644db3c96eddbbbd2d50eac56913': location: Replace ILocationCollector interface with new ILocationProvider method
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/ILocationCollector.aidl36
-rw-r--r--location/java/android/location/ILocationManager.aidl2
-rw-r--r--location/java/android/location/ILocationProvider.aidl2
-rw-r--r--location/java/android/location/LocationManager.java21
-rw-r--r--location/java/com/android/internal/location/GpsLocationProvider.java7
-rw-r--r--location/java/com/android/internal/location/LocationProviderProxy.java8
-rw-r--r--location/java/com/android/internal/location/MockProvider.java3
7 files changed, 20 insertions, 59 deletions
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
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java
index 9003848..725fbf9 100644
--- a/location/java/com/android/internal/location/GpsLocationProvider.java
+++ b/location/java/com/android/internal/location/GpsLocationProvider.java
@@ -406,6 +406,13 @@ public class GpsLocationProvider extends ILocationProvider.Stub {
}
/**
+ * This is called to inform us when another location provider returns a location.
+ * Someday we might use this for network location injection to aid the GPS
+ */
+ public void updateLocation(Location location) {
+ }
+
+ /**
* Returns true if the provider requires access to a
* satellite-based positioning system (e.g., GPS), false
* otherwise.
diff --git a/location/java/com/android/internal/location/LocationProviderProxy.java b/location/java/com/android/internal/location/LocationProviderProxy.java
index b40cdca..bd7088c 100644
--- a/location/java/com/android/internal/location/LocationProviderProxy.java
+++ b/location/java/com/android/internal/location/LocationProviderProxy.java
@@ -219,6 +219,14 @@ public class LocationProviderProxy implements IBinder.DeathRecipient {
}
}
+ public void updateLocation(Location location) {
+ try {
+ mProvider.updateLocation(location);
+ } catch (RemoteException e) {
+ Log.e(TAG, "updateLocation failed", e);
+ }
+ }
+
public boolean sendExtraCommand(String command, Bundle extras) {
try {
return mProvider.sendExtraCommand(command, extras);
diff --git a/location/java/com/android/internal/location/MockProvider.java b/location/java/com/android/internal/location/MockProvider.java
index f167a44..e2e0562 100644
--- a/location/java/com/android/internal/location/MockProvider.java
+++ b/location/java/com/android/internal/location/MockProvider.java
@@ -172,6 +172,9 @@ public class MockProvider extends ILocationProvider.Stub {
public void updateNetworkState(int state) {
}
+ public void updateLocation(Location location) {
+ }
+
public boolean sendExtraCommand(String command, Bundle extras) {
return false;
}