Further refactoring for multiple NTP servers
Further refactoring to support adding multiple NTP servers in a later commit. The logic for multiple servers will be added to forceRefresh() later. This commit also contains some refactoring to support improved testing of NtpTrustedTime.forceRefresh(). Tests for the existing behavior have been added here. As part of this change, SntpClient / NtpTrustedTime / NetworkTimeUpdateService have also been extended to pipe information about the IP address of the NTP server used to obtain the time back to the NetworkTimeUpdateService for improved logging / debugging support. Bug: 223365217 Test: atest frameworks/base/core/tests/coretests/src/android/util/NtpTrustedTimeTest.java Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/ Test: atest cts/tests/tests/os/src/android/os/cts/SystemClockSntpTest.java Test: Inspection: adb shell dumpsys network_time_update_service Test: Inspection: adb shell dumpsys time_detector Change-Id: Ia0f13e2c8cbd102d677797b745414d8ab5fa1eba
Loading
Please register or sign in to comment