Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 32d52f34 authored by Jerry Wong's avatar Jerry Wong Committed by Erik Kline
Browse files

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
parent beecb615
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment