Skip to content
Commit d2dda0e8 authored by Almaz Mingaleev's avatar Almaz Mingaleev
Browse files

Prioritise NTP over NITZ in time detection.

This change does not neglect NITZ. NITZ will be used if network
is not available for long enough so that previous NTP
suggestion becomes stale.

Before this change, if an NITZ time signal was available, it would be
given priority over an NTP-derived time.

After this change, if an NTP time signal is available, it will be given
priority over an NITZ-derived time.

This change modifies the default configuration of the system time
detector. It can be modified by partners altering the configuration
directly or by use of a build-time config overlay. The configuration can
not be influenced by users currently.

This change is being made because we have had reports over the years of
NITZ information being incorrect or inaccurate. Responsibility for
sending correct NITZ time lies with carriers and can even vary from cell
to cell on the same network. We assume NTP will be more consistent and
reliable, so we are modifying the default.

Testing plan: use `adb shell dumpsys time_detector` to see suggestions
history and what suggestion is currently being used.
One way to disable NTP suggestions is to turn off WiFi and cell data plan.
Other way is to remove "network" from config_autoTimeSourcesPriority
list in frameworks/base/core/res/res/values/config.xml.

Bug: 172230856
Test: presubmit only
Change-Id: I63e0b865eb454e6c368af846e6bcb3e1924a9d0f
parent c2d62406
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment