diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-11 03:47:09 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-11 16:58:39 -0800 |
commit | 0e1dbed9194839a90755670d8fdf9046a75b85f7 (patch) | |
tree | 010372762ddc617295da2862f7d61813da9e3586 /packages/SettingsProvider/src | |
parent | 564f10b8f05ddf4d9ea2c0e64f1b113fe6dad4b8 (diff) | |
parent | e342181a4a8d8177b3b87ffe141777565fe98f15 (diff) | |
download | frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.zip frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.gz frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/base into cm-13.0
Android 6.0.1 release 22
Change-Id: I0d31899b234156a91accb61e0a7fb3d8d16d5062
Diffstat (limited to 'packages/SettingsProvider/src')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java | 19 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 12 |
2 files changed, 30 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index b4543b3..ffe7623 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -161,6 +161,7 @@ public class SettingsBackupAgent extends BackupAgentHelper { String key_mgmt = ""; boolean certUsed = false; boolean hasWepKey = false; + boolean isEap = false; final ArrayList<String> rawLines = new ArrayList<String>(); public static Network readFromStream(BufferedReader in) { @@ -191,6 +192,9 @@ public class SettingsBackupAgent extends BackupAgentHelper { ssid = line; } else if (line.startsWith("key_mgmt=")) { key_mgmt = line; + if (line.contains("EAP")) { + isEap = true; + } } else if (line.startsWith("client_cert=")) { certUsed = true; } else if (line.startsWith("ca_cert=")) { @@ -199,6 +203,8 @@ public class SettingsBackupAgent extends BackupAgentHelper { certUsed = true; } else if (line.startsWith("wep_")) { hasWepKey = true; + } else if (line.startsWith("eap=")) { + isEap = true; } } @@ -327,6 +333,13 @@ public class SettingsBackupAgent extends BackupAgentHelper { continue; } } + // Don't propagate EAP network definitions + if (net.isEap) { + if (DEBUG_BACKUP) { + Log.v(TAG, "Skipping EAP network " + net.ssid + " / " + net.key_mgmt); + } + continue; + } if (! mKnownNetworks.contains(net)) { if (DEBUG_BACKUP) { Log.v(TAG, "Adding " + net.ssid + " / " + net.key_mgmt); @@ -355,6 +368,12 @@ public class SettingsBackupAgent extends BackupAgentHelper { continue; } + if (net.isEap) { + // Similarly, omit EAP network definitions to avoid propagating + // controlled enterprise network definitions. + continue; + } + net.write(w); } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index f55cead..5c871ca 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -1986,7 +1986,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { - private static final int SETTINGS_VERSION = 122; + private static final int SETTINGS_VERSION = 123; /** * This is the 12.1 database version (DO NOT INCREMENT) */ @@ -2170,6 +2170,16 @@ public class SettingsProvider extends ContentProvider { } currentVersion = 122; } + + if (currentVersion == 122) { + final SettingsState globalSettings = getGlobalSettingsLocked(); + String defaultDisabledProfiles = (getContext().getResources().getString( + R.string.def_bluetooth_disabled_profiles)); + globalSettings.insertSettingLocked(Settings.Global.BLUETOOTH_DISABLED_PROFILES, + defaultDisabledProfiles, SettingsState.SYSTEM_PACKAGE_NAME); + currentVersion = 123; + } + // vXXX: Add new settings above this point. // Return the current version. |