Make NtpTrustedTime safer / expand docs
This commit makes a number of changes: 1) Documents / enforces thread safety, removes or deprecates unsafe check-then-do methods / adds a way to get the NTP query result atomically. 2) Delays configuration lookup until point of use: the config can change due to various possible config overlays, e.g. MCC-based config. (1) is because the threading model is currently unclear / possibly unsafe - it looks like NtpTrustedTime is supposed to be single threaded but it's also a singleton so could be accessed from multiple threads. If NtpTrustedTime were not a singleton things might be easier but the @UnsupportedAppUsage makes it difficult to change now. (2) is to address the same issue as https://r.android.com/1182530, contributed by Luca Stefani. Bug: 140712361 Test: build only Change-Id: Ie09da9db5d853b59829886a020de21a88da5dd51
Loading
Please register or sign in to comment