summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2012-10-04 19:36:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-04 19:36:41 -0700
commit0cd3c976a273a25c2d642064ade997bdf9d99855 (patch)
treee1900ed397dc75bc78e754fc236ce945cdaff163 /packages
parent82b946496e2a503b5b21af318af5be828a223a44 (diff)
parent5067685ccf6c294a77a3e7f0577190600a0e6238 (diff)
downloadframeworks_base-0cd3c976a273a25c2d642064ade997bdf9d99855.zip
frameworks_base-0cd3c976a273a25c2d642064ade997bdf9d99855.tar.gz
frameworks_base-0cd3c976a273a25c2d642064ade997bdf9d99855.tar.bz2
Merge "Settings (and general) restore fixes" into jb-mr1-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java10
1 files changed, 8 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 ba7501b..5672823 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -61,6 +61,12 @@ public class SettingsBackupAgent extends BackupAgentHelper {
private static final boolean DEBUG = false;
private static final boolean DEBUG_BACKUP = DEBUG || false;
+ /* Don't restore wifi config until we have new logic for parsing the
+ * saved wifi config and configuring the new APs without having to
+ * disable and re-enable wifi
+ */
+ private static final boolean NAIVE_WIFI_RESTORE = false;
+
private static final String KEY_SYSTEM = "system";
private static final String KEY_SECURE = "secure";
private static final String KEY_GLOBAL = "global";
@@ -307,7 +313,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
mSettingsHelper.applyAudioSettings();
} else if (KEY_SECURE.equals(key)) {
restoreSettings(data, Settings.Secure.CONTENT_URI, movedToGlobal);
- } else if (KEY_WIFI_SUPPLICANT.equals(key)) {
+ } else if (NAIVE_WIFI_RESTORE && KEY_WIFI_SUPPLICANT.equals(key)) {
int retainedWifiState = enableWifi(false);
restoreWifiSupplicant(FILE_WIFI_SUPPLICANT, data);
FileUtils.setPermissions(FILE_WIFI_SUPPLICANT,
@@ -321,7 +327,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
byte[] localeData = new byte[size];
data.readEntityData(localeData, 0, size);
mSettingsHelper.setLocaleData(localeData, size);
- } else if (KEY_WIFI_CONFIG.equals(key)) {
+ } else if (NAIVE_WIFI_RESTORE && KEY_WIFI_CONFIG.equals(key)) {
restoreFileData(mWifiConfigFile, data);
} else {
data.skipEntityData();