diff options
author | Nalla Kartheek <karthe@codeaurora.org> | 2015-06-24 18:09:06 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:27:07 -0600 |
commit | 70918513a2594d2c315e3addbc287eb9e378e49f (patch) | |
tree | 789a7cba431f5f40ad798cc6093383b7be7a9526 /packages/SettingsProvider | |
parent | 4224b21cdd859619ed0532270c32f65b9ea54fe9 (diff) | |
download | frameworks_base-70918513a2594d2c315e3addbc287eb9e378e49f.zip frameworks_base-70918513a2594d2c315e3addbc287eb9e378e49f.tar.gz frameworks_base-70918513a2594d2c315e3addbc287eb9e378e49f.tar.bz2 |
Wifi: Maintain configKey generation logic same in backup agent
AutoJoinController uses configKey to distinguish networks. It compares
configKeys of saved network with recent ScanResult. WifiConfiguration
has two different APIs to generate configKey based on input variables.
Framework should use same logic to generate configkey even though input
differs. This fix ensures the parity in backup agent.
Change-Id: I6ee57efe1d346e50a434bce90ec8224f5203712c
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java index b9a9c24..7a8caf5 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java @@ -255,13 +255,13 @@ public class SettingsBackupAgent extends BackupAgentHelper { // Now build the canonical config key paralleling the WifiConfiguration semantics final String key; if (types.get(KeyMgmt.WPA_PSK)) { - key = bareSsid + KeyMgmt.strings[KeyMgmt.WPA_PSK]; + key = bareSsid + "-" + KeyMgmt.strings[KeyMgmt.WPA_PSK]; } else if (types.get(KeyMgmt.WPA_EAP) || types.get(KeyMgmt.IEEE8021X)) { - key = bareSsid + KeyMgmt.strings[KeyMgmt.WPA_EAP]; + key = bareSsid + "-" + KeyMgmt.strings[KeyMgmt.WPA_EAP]; } else if (hasWepKey) { - key = bareSsid + "WEP"; // hardcoded this way in WifiConfiguration + key = bareSsid + "-WEP"; // hardcoded this way in WifiConfiguration } else { - key = bareSsid + KeyMgmt.strings[KeyMgmt.NONE]; + key = bareSsid + "-" + KeyMgmt.strings[KeyMgmt.NONE]; } return key; } |