diff options
author | Christopher Tate <ctate@google.com> | 2015-08-07 10:57:01 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-08-07 10:57:01 -0700 |
commit | 907e01eb7083c54aa1e840ea4e76a6518a028a72 (patch) | |
tree | cdd7216833f97deb1ecc64b19784251c725a4d5a /packages/SettingsProvider | |
parent | bb55aa1a93cee91a40b6f5941675682cb6f8a83b (diff) | |
download | frameworks_base-907e01eb7083c54aa1e840ea4e76a6518a028a72.zip frameworks_base-907e01eb7083c54aa1e840ea4e76a6518a028a72.tar.gz frameworks_base-907e01eb7083c54aa1e840ea4e76a6518a028a72.tar.bz2 |
Wait a bit longer for wifi to shut down before rewriting the config
We've seen case of it taking longer than 1500ms for the wifi system to
actually shut down after the triggering settings element is written,
so extend the wait time a bit. We've seen it take more than 1500ms
but not more than 2500ms, so that's the new heuristic.
This will of course all become happily obsolete once we start
applying restored AP definitions programmatically rather than by
filesystem-level operations.
Bug 22979342
Change-Id: I6acf1baac23d4100124093128b82abf242b11a0e
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index d99f741..e74334b 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -447,8 +447,10 @@ public class SettingsBackupAgent extends BackupAgentHelper { Settings.Global.putInt(cr, Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0); } - // !!! Give the wifi stack a moment to quiesce - try { Thread.sleep(1500); } catch (InterruptedException e) {} + // !!! Give the wifi stack a moment to quiesce. We've observed the + // response to disabling WIFI_SCAN_ALWAYS_AVAILABLE taking more + // than 1500ms, so we wait a generous 2500 here before proceeding. + try { Thread.sleep(2500); } catch (InterruptedException e) {} if (restoredSupplicantData != null) { restoreWifiSupplicant(FILE_WIFI_SUPPLICANT, restoredSupplicantData, restoredSupplicantData.length); |