location: Generalize support for location provider usage tracking.

This replaces two different mechanisms that were used for GPS and Netork
location provider tracking.
Move BatteryStats logging of GPS usage from LocationManagerService to
GpsLocationProvider.
Clean up tracking of location listeners in LocationManagerService and remove
some HashMaps that are no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-04-17 08:24:10 -04:00
parent 21b5817aaa
commit 2f82c4eb0b
5 changed files with 202 additions and 282 deletions

View File

@@ -230,17 +230,17 @@ public class LocationProviderProxy extends LocationProviderImpl {
}
}
public void addListener(String[] applications) {
public void addListener(int uid) {
try {
mProvider.addListener(applications);
mProvider.addListener(uid);
} catch (RemoteException e) {
Log.e(TAG, "addListener failed", e);
}
}
public void removeListener(String[] applications) {
public void removeListener(int uid) {
try {
mProvider.removeListener(applications);
mProvider.removeListener(uid);
} catch (RemoteException e) {
Log.e(TAG, "removeListener failed", e);
}