Prepare for rate limiting TimeZoneProviderService
Prepare for rate limiting TimeZoneProviderService. The first step is to add duplicate event detection. Later, this will be extended to add a time component. i.e. the android.service.timezone.TimeZoneProviderService will pass on suggestions that are semantically different from a previous event, but will not if they are semantically the same. In a later commit it will be made to pass on changes that are the same but newer than some threshold. Most of the changes in this commit are to track a change to the binder API and the move of TimeZoneProviderEvent so that it can be used in code outside of the system server. Also: + TimeZoneProviderService is now stateful, so add dump() implementation. Because dump() is called on the main thread, add locks needed for safe threading (previously, all logic took place on a known handler thread). Test: atest hostsidetests/time/host/src/android/time/cts/host/LocationTimeZoneManagerHostTest.java Test: atest core/tests/coretests/src/android/service/timezone/TimeZoneProviderEventTest.java Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/location/ZoneInfoDbTimeZoneProviderEventPreProcessorTest.java Test: treehugger Bug: 197624972 Bug: 200710190 Change-Id: Ia3246e969fda61836c8e1eee3007a8177d119994
Loading
Please register or sign in to comment