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

Commit 33da8dde authored by Evan Charlton's avatar Evan Charlton Committed by Android (Google) Code Review
Browse files

Merge "Allow for a configurable WiFi restore bounce delay"

parents 11f66d08 cc7b0435
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6040,6 +6040,16 @@ public final class Settings {
         */
        public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout";

        /**
         * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after
         * the caller is done with this, they should call {@link ContentResolver#delete(Uri)} to
         * clean up any value that they may have written.
         *
         * @hide
         */
        public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms";


        /**
         * Settings to backup. This is here so that it's in the same place as the settings
         * keys and easy to update.
+5 −1
Original line number Diff line number Diff line
@@ -422,7 +422,11 @@ public class SettingsBackupAgent extends BackupAgentHelper {
        // If we have wifi data to restore, post a runnable to perform the
        // bounce-and-update operation a little ways in the future.
        if (mWifiRestore != null) {
            new Handler(getMainLooper()).postDelayed(mWifiRestore, WIFI_BOUNCE_DELAY_MILLIS);
            long wifiBounceDelayMillis = Settings.Global.getLong(
                    getContentResolver(),
                    Settings.Global.WIFI_BOUNCE_DELAY_OVERRIDE_MS,
                    WIFI_BOUNCE_DELAY_MILLIS);
            new Handler(getMainLooper()).postDelayed(mWifiRestore, wifiBounceDelayMillis);
        }
    }