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

Skip to content
Commit a395ffdd authored by Neil Fuller's avatar Neil Fuller
Browse files

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
parent 251fa87f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment