Refactoring to make adding a secondary easier
This commit contains refactorings intended to make the addition of a secondary LocationTimeZoneProvider easier and clearer. This change contains various refactorings to code and comments: 1) Start referring to the provider as the primary in some places. 2) Move the initialization timeout tracking to the LocationTimeZoneProvider so each provider can be responsible for tracking its own initialization timeout, giving the controller less to do. 3) The PROVIDER_STATE_ENABLED has been split into _INITIALIZING, _CERTAIN and _UNCERTAIN variants which are determined by the most recent event the provider has sent. The controller therefore doesn't need to track this either. 4) Introduction of a "single runnable" for the uncertainty timeout managed by the ControllerImpl. 5) Many ControllerImplTest changes resulting from all the above and to maximize tests readability. Bug: 152744911 Bug: 149014708 Test: atest services/tests/servicestests/src/com/android/server/location/timezone/ Change-Id: I64b9cc33c5f97f2edb1063a8133434bfd8e9dda1
Loading
Please register or sign in to comment