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

Extract an "ArrayMapWithHistory" support class

Extract a simple wrapper around ArrayMap called "ArrayMapWithHistory",
with associated tests. TimeDetectorStrategyImpl and
TimeZoneDetectorStrategy were duplicating some data structure logic.

ArrayMapWithHistory works the same as ArrayMap, but there is a (mostly
hidden) history of the values for each map entry. This is useful for
debugging.

A second class, ReferenceWithHistory, has been included to support the
ArrayMapWithHistory class and for use when extending the time / time
zone detector strategy implementations: this will be useful as
additional sources like GNSS / NTP are added to time detector, and
geo-location are added to time zone detection.

Bug: 146563025
Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest com.android.server.timezonedetector
Change-Id: Ia6195cb628679a6a32c0118d2921e699514eed7d
parent 7b2a2936
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