diff options
author | Jerry Wong <jpwong@broadcom.com> | 2015-10-06 22:18:11 -0700 |
---|---|---|
committer | Erik Kline <ek@google.com> | 2015-10-17 03:36:32 +0900 |
commit | 32d52f344aa564154b96cadc2dda3f0de3d0f455 (patch) | |
tree | 9097a097156ba5ceaff46eeb8aa3d9c46ac52df3 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | beecb61554b5f55fd4ec2da945328eefb918b4e1 (diff) |
Incorrect time used in some NTP server responses
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions