diff options
| author | 2024-12-03 23:33:58 +0000 | |
|---|---|---|
| committer | 2024-12-13 09:38:38 +0000 | |
| commit | 9d9a4d20ec71816f0c6b75aa539303cc8f26ed15 (patch) | |
| tree | 55525c58b49ded33c60e7ac8e557eac569a1efa4 /libs/androidfw/AssetsProvider.cpp | |
| parent | 93df45a050622f0d42a2f475efdad7db19e59cbb (diff) | |
Location Fudger: Gate behind correct flags
Fixes the current warning: `[FlaggedApi] Method getCoarseningLevel() is a flagged API and should be inside an if (Flags.populationDensityProvider()) check`
In practice, calling the method while the flag is disabled should never happen, as "Flags.populationDensityProvider()" should imply that the cache is null (see the code in the Manager). Yet, it seems bad practice to call an API gated behind a flag without checking this flag, so in essence the warning is correct. Thus this commit should remove a potential footgun if the code in the manager changes.
Tests:
- atest FrameworksMockingServicesTests:LocationFudgerTest
- atest FrameworksMockingServicesTests:LocationFudgerCacheTest
Test: manual atest on Pixel 7 pro (see above)
Flag: android.location.flags.density_based_coarse_locations
Bug: 376198890
Change-Id: I8bfd9c6e4f4921d7e6389f2924b6b3566a8ae07f
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions