public class LocationRequestStatistics extends Object
Must be externally synchronized.
Modifier and Type | Class and Description |
---|---|
static class |
LocationRequestStatistics.PackageProviderKey
A key that holds both package and provider names.
|
static class |
LocationRequestStatistics.PackageStatistics
Usage statistics for a package/provider pair.
|
Modifier and Type | Field and Description |
---|---|
HashMap<LocationRequestStatistics.PackageProviderKey,LocationRequestStatistics.PackageStatistics> |
statistics |
Constructor and Description |
---|
LocationRequestStatistics() |
Modifier and Type | Method and Description |
---|---|
void |
startRequesting(String packageName,
String providerName,
long intervalMs)
Signals that a package has started requesting locations.
|
void |
stopRequesting(String packageName,
String providerName)
Signals that a package has stopped requesting locations.
|
public final HashMap<LocationRequestStatistics.PackageProviderKey,LocationRequestStatistics.PackageStatistics> statistics
public void startRequesting(String packageName, String providerName, long intervalMs)
packageName
- Name of package that has requested locations.providerName
- Name of provider that is requested (e.g. "gps").intervalMs
- The interval that is requested in ms.