Population Density Provider: add cache hint
Adds a parameter to indicate the desired answer size when querying the coarsened cells. This allows the framework to indicate its cache size, and the provider to answer with the right amount of cells.
Tests:
- atest CtsLocationNoneTestCases:PopulationDensityProviderBaseTest
- atest FrameworksMockingServicesTests:LocationProviderManagerTest
- atest FrameworksMockingServicesTests:LocationFudgerTest
- atest FrameworksMockingServicesTests:LocationFudgerCacheTest
Test: manual atest on Pixel 7 pro (see above)
Bug: 381286551
Flag: android.location.flags.density_based_coarse_locations
Change-Id: Ib0d26e8ce0e1164ff30b45e2d3deddb67f68a83b
diff --git a/location/api/system-current.txt b/location/api/system-current.txt
index 8cd08d3..9478e35 100644
--- a/location/api/system-current.txt
+++ b/location/api/system-current.txt
@@ -645,7 +645,7 @@
@FlaggedApi("android.location.flags.population_density_provider") public abstract class PopulationDensityProviderBase {
ctor public PopulationDensityProviderBase(@NonNull android.content.Context, @NonNull String);
method @Nullable public final android.os.IBinder getBinder();
- method public abstract void onGetCoarsenedS2Cell(double, double, @NonNull android.os.OutcomeReceiver<long[],java.lang.Throwable>);
+ method public abstract void onGetCoarsenedS2Cells(double, double, @IntRange(from=0) int, @NonNull android.os.OutcomeReceiver<long[],java.lang.Throwable>);
method public abstract void onGetDefaultCoarseningLevel(@NonNull android.os.OutcomeReceiver<java.lang.Integer,java.lang.Throwable>);
field public static final String ACTION_POPULATION_DENSITY_PROVIDER = "com.android.location.service.PopulationDensityProvider";
}