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

Commit 79d198f1 authored by Neil Fuller's avatar Neil Fuller Committed by Android (Google) Code Review
Browse files

Merge "Change from system prop to config"

parents f69ccd68 3caadb77
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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>
+1 −0
Original line number Diff line number Diff line
@@ -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" />
+2 −6
Original line number Diff line number Diff line
@@ -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;
@@ -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
@@ -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.