@@ -61,6 +61,12 @@ public class SettingsBackupAgent extends BackupAgentHelper {
6161 private static final boolean DEBUG = false ;
6262 private static final boolean DEBUG_BACKUP = DEBUG || false ;
6363
64+ /* Don't restore wifi config until we have new logic for parsing the
65+ * saved wifi config and configuring the new APs without having to
66+ * disable and re-enable wifi
67+ */
68+ private static final boolean NAIVE_WIFI_RESTORE = false ;
69+
6470 private static final String KEY_SYSTEM = "system" ;
6571 private static final String KEY_SECURE = "secure" ;
6672 private static final String KEY_GLOBAL = "global" ;
@@ -307,7 +313,7 @@ public void onRestore(BackupDataInput data, int appVersionCode,
307313 mSettingsHelper .applyAudioSettings ();
308314 } else if (KEY_SECURE .equals (key )) {
309315 restoreSettings (data , Settings .Secure .CONTENT_URI , movedToGlobal );
310- } else if (KEY_WIFI_SUPPLICANT .equals (key )) {
316+ } else if (NAIVE_WIFI_RESTORE && KEY_WIFI_SUPPLICANT .equals (key )) {
311317 int retainedWifiState = enableWifi (false );
312318 restoreWifiSupplicant (FILE_WIFI_SUPPLICANT , data );
313319 FileUtils .setPermissions (FILE_WIFI_SUPPLICANT ,
@@ -321,7 +327,7 @@ public void onRestore(BackupDataInput data, int appVersionCode,
321327 byte [] localeData = new byte [size ];
322328 data .readEntityData (localeData , 0 , size );
323329 mSettingsHelper .setLocaleData (localeData , size );
324- } else if (KEY_WIFI_CONFIG .equals (key )) {
330+ } else if (NAIVE_WIFI_RESTORE && KEY_WIFI_CONFIG .equals (key )) {
325331 restoreFileData (mWifiConfigFile , data );
326332 } else {
327333 data .skipEntityData ();
0 commit comments