diff options
| -rw-r--r-- | core/java/android/provider/Settings.java | 10 | ||||
| -rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 843a4687f4fa..ee370451bb77 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6041,6 +6041,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. * diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index 7b09092508ad..45957a49763d 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -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); } } |