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

Add a state to LocationTimeZoneProviderController

Add an explicit state field to LocationTimeZoneProviderController to
help with telemetry / metrics. Previously, this state information was
implicit.

This commit adds the code necessary to support metrics, but does not
actually integrate with the metrics system. A TODO has been left in the
code to complete the plumbing.

The state information records the state as would be reflected by the
controller's actions. For example, the controller may have received an
"uncertain" suggestion from a provider, but still be in the uncertainty
timeout period, and therefore the state could still be considered
"INITIALIZING" or "CERTAIN" until the controller has actually
communicated it is uncertain.

The intent of adding this explicit state information is to help with
metrics and telemetry. It also helps with testing and debugging to
ensure the controller is transitioning through all the correct states on
the way to a final correct state.

The main indicator desired from this state is to enable metrics that
record how much time the controller spends active / inactive, as well as
certain and uncertain. Previous to this change, similar information was
captured at the location time zone provider (LTZP) level, but
LTZP-level information would be difficult to use when multiple LTZPs are
running concurrently. For example, in order to tell what percentage of
time the geolocation detection system as a whole is certain / uncertain,
it is necessary to understand how much time the geolocation detection
system as a whole was actually running.

Bug: 200279201
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Test: atest cts/hostsidetests/time/host/src/android/time/cts/host/
Change-Id: I8154caee41e96b03e6a43b51ee8d1556ba77bb4d
parent d3dadfbd
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