Coarse locations: Add logging to LocationFudger and LocationManagerService
We reuse the logger already present in the framework, e.g., in frameworks/base/services/core/java/com/android/server/biometrics/log/BiometricFrameworkStatsLogger.java or frameworks/base/services/core/java/com/android/server/vibrator/VibratorFrameworkStatsLogger.java. We add three logs: - When the population density provider is instantiated (happens once every reboot). - When the LocationFudger contacts the Population Density provider (happens at most once per S2 cell, until the device moves to a new cell). - When the new algorithm is used. To avoid incurring a performance hit on each query to the LocationFudger, the call to this logger is rate-limited to once every 10min max. The log messages definitions are in https://android-review.git.corp.google.com/c/platform/frameworks/proto_logging/+/3430986 Nit: The method fetchDefaultCoarseningLevel() is renamed to better capture what it now does. Change-Id: I9b886c0e0307dfb511812be72b3454661c0a0255 Tests: - atest FrameworksMockingServicesTests:LocationFudgerTest - atest FrameworksMockingServicesTests:LocationFudgerCacheTest Test: existing tests still pass. Added a test for the rate-limiting. Flag: android.location.flags.density_based_coarse_locations Bug: 385288747 Change-Id: Id9402a754dd8693c1255c65001927f9a576f76b4
Loading
Please register or sign in to comment