summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmaz Mingaleev <mingaleev@google.com>2021-01-28 16:20:09 +0000
committerAlmaz Mingaleev <mingaleev@google.com>2021-02-10 14:53:49 +0000
commitd2dda0e8d3f51fe598ee3869914e1f583ea86fc3 (patch)
tree9543dd592b942c5fcf81e688aca5476355d0102f
parentc2d6240642852362dc6e255d6396b9065e79762c (diff)
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
-rw-r--r--core/res/res/values/config.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 20cb27085661..ee45249c2030 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1547,8 +1547,8 @@
take precedence over lower ones.
See com.android.server.timedetector.TimeDetectorStrategy for available sources. -->
<string-array name="config_autoTimeSourcesPriority">
- <item>telephony</item>
<item>network</item>
+ <item>telephony</item>
</string-array>
<!-- Enables the TimeZoneRuleManager service. This is the global switch for the updateable time