Per RFC 4330, a NTP server response should be discarded when: - the stratum is 0 (unspecified), or - the leap indicator is 3 (unsync'ed), or - the mode is not 4 (server) / 5 (broadcast), or - the transmitted time is 0. Update SntpClient so that such responses would be discarded. Additionally: - make some variables suitably "final" - enable logging - add alternate requestTime() for testing - add some miniscule test coverage Cherry-picked from Jerry Wong's https://partner-android-review.googlesource.com/#/c/460074 Bug: 24719581 Change-Id: Id11a79a6e53ce95500ed4b4d691a29c260666f6c
…
…
…
Description
No description provided
Languages
Java
77.3%
Kotlin
9.2%
PowerBuilder
6.6%
C++
5.5%
AIDL
1%