OSDN Git Service

Always give wifi a chance to quiet down during restore
authorChristopher Tate <ctate@google.com>
Sat, 20 Sep 2014 00:03:59 +0000 (17:03 -0700)
committerChristopher Tate <ctate@google.com>
Sat, 20 Sep 2014 00:03:59 +0000 (17:03 -0700)
Not just when the current scan-always setting is on.

Bug 17571997

Change-Id: Idc56c9682c18f5e23c0bde98736522a79583af5e

packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java

index 45957a4..78af785 100644 (file)
@@ -352,9 +352,9 @@ public class SettingsBackupAgent extends BackupAgentHelper {
                 if (scanAlways != 0) {
                     Settings.Global.putInt(cr,
                             Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0);
-                    // !!! Give the wifi stack a moment to quiesce
-                    try { Thread.sleep(1000); } catch (InterruptedException e) {}
                 }
+                // !!! Give the wifi stack a moment to quiesce
+                try { Thread.sleep(1500); } catch (InterruptedException e) {}
                 if (restoredSupplicantData != null) {
                     restoreWifiSupplicant(FILE_WIFI_SUPPLICANT,
                             restoredSupplicantData, restoredSupplicantData.length);