Copy LocationProviderBase API into SystemApi surface

This allows third party location providers to link against the standard
API surface. This replaces the LocationProviderBase implementation in
the com.android.location.providers API. Both will temporarily coexist
until third party applications can be migrated, and then old version
will be removed. Only the LocationProviderBase API is migrated right now
as its the only API that has undergone changes.

This also restores some old, unused classes which should not have been
remove from the API surface. Clients that support older API version will
still need to link against these classes.

Bug: 176115245
Test: builds
Change-Id: I2d688447e1f59e441f5c48ff36d3f0dd8b5dc7f6
This commit is contained in:
Soonil Nagarkar
2020-12-24 14:02:44 -08:00
parent a4c1faff5b
commit 49983fcbbd
39 changed files with 1207 additions and 372 deletions

View File

@@ -17,6 +17,7 @@
package android.location;
import android.annotation.Nullable;
import android.location.provider.ProviderProperties;
/**
* Information about the properties of a location provider.
@@ -200,10 +201,8 @@ public class LocationProvider {
}
/**
* Returns the power requirement for this provider.
*
* @return the power requirement for this provider, as one of the
* constants ProviderProperties.POWER_USAGE_*.
* Returns the power requirement for this provider, one of the ProviderProperties.POWER_USAGE_*
* constants.
*/
public int getPowerRequirement() {
if (mProperties == null) {
@@ -214,11 +213,8 @@ public class LocationProvider {
}
/**
* Returns a constant describing horizontal accuracy of this provider.
* If the provider returns finer grain or exact location,
* {@link ProviderProperties#ACCURACY_FINE} is returned, otherwise if the
* location is only approximate then {@link ProviderProperties#ACCURACY_COARSE}
* is returned.
* Returns the rough accuracy of this provider, one of the ProviderProperties.ACCURACY_*
* constants.
*/
public int getAccuracy() {
if (mProperties == null) {