Loading core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1854,6 +1854,11 @@ <item>telephony</item> </string-array> <!-- The difference in millis that has to exist between a time suggestion under consideration by the time_detector and the system clock before the system clock will be changed. --> <integer name="config_timeDetectorAutoUpdateDiffMillis">2000</integer> <!-- Enables the GnssTimeUpdate service. This is the global switch for enabling Gnss time based suggestions to TimeDetector service. See also config_autoTimeSourcesPriority. --> <bool name="config_enableGnssTimeUpdateService">false</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2241,6 +2241,7 @@ <java-symbol type="string" name="config_persistentDataPackageName" /> <java-symbol type="string" name="config_deviceConfiguratorPackageName" /> <java-symbol type="array" name="config_autoTimeSourcesPriority" /> <java-symbol type="integer" name="config_timeDetectorAutoUpdateDiffMillis" /> <java-symbol type="bool" name="config_enableGnssTimeUpdateService" /> <java-symbol type="bool" name="config_enableGeolocationTimeZoneDetection" /> <java-symbol type="bool" name="config_enablePrimaryLocationTimeZoneProvider" /> Loading services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java +2 −6 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.database.ContentObserver; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading @@ -65,8 +64,6 @@ import java.util.function.Supplier; */ final class ServiceConfigAccessorImpl implements ServiceConfigAccessor { private static final int SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT = 2 * 1000; /** * An absolute threshold at/below which the system clock confidence can be upgraded. i.e. if the * detector receives a high-confidence time and the current system clock is +/- this value from Loading Loading @@ -122,9 +119,8 @@ final class ServiceConfigAccessorImpl implements ServiceConfigAccessor { mConfigOriginPrioritiesSupplier = new ConfigOriginPrioritiesSupplier(context); mServerFlagsOriginPrioritiesSupplier = new ServerFlagsOriginPrioritiesSupplier(mServerFlags); mSystemClockUpdateThresholdMillis = SystemProperties.getInt("ro.sys.time_detector_update_diff", SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT); mSystemClockUpdateThresholdMillis = context.getResources().getInteger( R.integer.config_timeDetectorAutoUpdateDiffMillis); // Wire up the config change listeners for anything that could affect ConfigurationInternal. // Use the main thread for event delivery, listeners can post to their chosen thread. Loading Loading
core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1854,6 +1854,11 @@ <item>telephony</item> </string-array> <!-- The difference in millis that has to exist between a time suggestion under consideration by the time_detector and the system clock before the system clock will be changed. --> <integer name="config_timeDetectorAutoUpdateDiffMillis">2000</integer> <!-- Enables the GnssTimeUpdate service. This is the global switch for enabling Gnss time based suggestions to TimeDetector service. See also config_autoTimeSourcesPriority. --> <bool name="config_enableGnssTimeUpdateService">false</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2241,6 +2241,7 @@ <java-symbol type="string" name="config_persistentDataPackageName" /> <java-symbol type="string" name="config_deviceConfiguratorPackageName" /> <java-symbol type="array" name="config_autoTimeSourcesPriority" /> <java-symbol type="integer" name="config_timeDetectorAutoUpdateDiffMillis" /> <java-symbol type="bool" name="config_enableGnssTimeUpdateService" /> <java-symbol type="bool" name="config_enableGeolocationTimeZoneDetection" /> <java-symbol type="bool" name="config_enablePrimaryLocationTimeZoneProvider" /> Loading
services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java +2 −6 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.database.ContentObserver; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading @@ -65,8 +64,6 @@ import java.util.function.Supplier; */ final class ServiceConfigAccessorImpl implements ServiceConfigAccessor { private static final int SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT = 2 * 1000; /** * An absolute threshold at/below which the system clock confidence can be upgraded. i.e. if the * detector receives a high-confidence time and the current system clock is +/- this value from Loading Loading @@ -122,9 +119,8 @@ final class ServiceConfigAccessorImpl implements ServiceConfigAccessor { mConfigOriginPrioritiesSupplier = new ConfigOriginPrioritiesSupplier(context); mServerFlagsOriginPrioritiesSupplier = new ServerFlagsOriginPrioritiesSupplier(mServerFlags); mSystemClockUpdateThresholdMillis = SystemProperties.getInt("ro.sys.time_detector_update_diff", SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT); mSystemClockUpdateThresholdMillis = context.getResources().getInteger( R.integer.config_timeDetectorAutoUpdateDiffMillis); // Wire up the config change listeners for anything that could affect ConfigurationInternal. // Use the main thread for event delivery, listeners can post to their chosen thread. Loading