Add GnssTimeUpdateService.
GnssTimeUpdateService listens for location updates. Once an update is
received, it reads the time provided by GPS and suggests it to
TimeDetectorService. TimeDetectorService can then use it to set the
SystemClock based on included time sources and priority.
Bug: 157265008
Test: Presubmits + atest + Manual
- atest frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
- For manual testing, the Location Shell Commands can be used to add /
enable a gps test provider to set gps locations with a specified time.
The time detector dumpsys can then be used to verify that a GNSS
suggestion has been made.
Change-Id: Ife27ecd6d122f33b7cc93d7832e3085acc33c160
5 files changed