summaryrefslogtreecommitdiff
path: root/ravenwood/scripts/extract-last-soong-commands.py
diff options
context:
space:
mode:
author Ludovic Barman <ludovicb@google.com> 2024-11-20 16:06:42 +0000
committer Ludovic Barman <ludovicb@google.com> 2024-11-27 21:47:23 +0000
commit7749835f6751fcddba6754550a1ab8c341e499cd (patch)
tree9e73165d0006b67c2ede1d744d9f4e43a54cdb67 /ravenwood/scripts/extract-last-soong-commands.py
parent4f699aab2a43ec7d5fddcbb7b1be1f1dabd47057 (diff)
Coarse locations based on population density.
At a high-level, this adds the option to coarsen (fudge) locations based on the population density at the device location. This feature is gated behind a flag. In details: Adds a new LocationFudgerCache to the existing LocationFudger. This cache is responsible for querying and storing values from the population density provider created in the other commits of this topic. The cache is necessary because of the asynchronous nature of the provider, whereas the LocationFudger requires an immediate answer. The cache is a simple fixed-size LIFO cache that stores S2CellIds, and returns the S2 level when a query corresponds to a cell in the cache. If the cache doesn't hold a corresponding value, it returns a default value. Changes the LocationFudger to use this cache and coarsen the location to the indicated S2 level. Changes the LocationProviderManager and LocationManagerService to pass the new LocationFudgerCache to LocationFudger. Tests: - atest FrameworksMockingServicesTests:LocationManagerServiceTest - atest FrameworksMockingServicesTests:LocationProviderManagerTest - atest FrameworksMockingServicesTests:LocationFudgerTest - atest FrameworksMockingServicesTests:LocationFudgerCacheTest Test: manual atest on Pixel 7 pro (see above) Bug: 376198890 Flag: android.location.flags.density_based_coarse_locations Change-Id: I66d1d80fdb75e82781d09e787e8a2c17af092747
Diffstat (limited to 'ravenwood/scripts/extract-last-soong-commands.py')
0 files changed, 0 insertions, 0 deletions