Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4f699aab authored by Ludovic Barman's avatar Ludovic Barman
Browse files

Add PopulationDensityProvider

This change adds the concept of population density providers in AOSP. It allows the framework to query the population density at a given location. Internally, this is backed by a new type of Provider, following the current conventions in the location package. There is no app-facing change, only the LocationManagerService will access this provider (see other CLs in the topic).

Because the provider will be implemented by Play Services (or OEM implementations), we add a proxy mechanism identical to the current ProxyLocationProvider, which reads the config.xml and instantiates the correct provider.

The core of the change is IPopulationDensityProvider.aidl.

In details:
- We add a new IPopulationDensityProvider IDL with its associated implementation PopulationDensityProviderBase.
- We add the IDL for two callback type for the S2CellId and the default coarsening level.
- We change the LocationManagerService to instantiate a ProxyPopulationDensityProvider.
- This ProxyPopulationDensityProvider creates the correct provider given the XML config.

Tests:
- atest CtsLocationNoneTestCases:PopulationDensityProviderBaseTest
- atest FrameworksMockingServicesTests:LocationManagerServiceTest

NB: I also did a manual test by implementing a fake provider and querying it, this works on Pixel 7 pro, see linked commits with topic "population-density-provider-test-dns"

Test: manual atest on Pixel 7 pro (see above)
Bug: 376198890
Flag: android.location.flags.population_density_provider
Change-Id: I90663d478200c734abbf5f442dfb1bb8bb79a875
parent cd0151ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment