Loading services/java/com/android/server/WifiService.java +25 −11 Original line number Diff line number Diff line Loading @@ -542,7 +542,7 @@ public class WifiService extends IWifiManager.Stub { value = WifiNative.getNetworkVariableCommand(netId, WifiConfiguration.ssidVarName); if (!TextUtils.isEmpty(value)) { config.SSID = value; config.SSID = removeDoubleQuotes(value); } else { config.SSID = null; } Loading Loading @@ -675,11 +675,21 @@ public class WifiService extends IWifiManager.Stub { value = WifiNative.getNetworkVariableCommand(netId, field.varName()); if (!TextUtils.isEmpty(value)) { if (field != config.eap) value = removeDoubleQuotes(value); field.setValue(value); } } } private static String removeDoubleQuotes(String string) { if (string.length() <= 2) return ""; return string.substring(1, string.length() - 1); } private static String convertToQuotedString(String string) { return "\"" + string + "\""; } /** * see {@link android.net.wifi.WifiManager#addOrUpdateNetwork(WifiConfiguration)} * @return the supplicant-assigned identifier for the new or updated Loading Loading @@ -731,7 +741,7 @@ public class WifiService extends IWifiManager.Stub { !WifiNative.setNetworkVariableCommand( netId, WifiConfiguration.ssidVarName, config.SSID)) { convertToQuotedString(config.SSID))) { if (DBG) { Log.d(TAG, "failed to set SSID: "+config.SSID); } Loading Loading @@ -894,7 +904,11 @@ public class WifiService extends IWifiManager.Stub { : config.enterpriseFields) { String varName = field.varName(); String value = field.value(); if ((value != null) && !WifiNative.setNetworkVariableCommand( if (value != null) { if (field != config.eap) { value = convertToQuotedString(value); } if (!WifiNative.setNetworkVariableCommand( netId, varName, value)) { Loading @@ -905,7 +919,7 @@ public class WifiService extends IWifiManager.Stub { break setVariables; } } } return netId; } Loading Loading
services/java/com/android/server/WifiService.java +25 −11 Original line number Diff line number Diff line Loading @@ -542,7 +542,7 @@ public class WifiService extends IWifiManager.Stub { value = WifiNative.getNetworkVariableCommand(netId, WifiConfiguration.ssidVarName); if (!TextUtils.isEmpty(value)) { config.SSID = value; config.SSID = removeDoubleQuotes(value); } else { config.SSID = null; } Loading Loading @@ -675,11 +675,21 @@ public class WifiService extends IWifiManager.Stub { value = WifiNative.getNetworkVariableCommand(netId, field.varName()); if (!TextUtils.isEmpty(value)) { if (field != config.eap) value = removeDoubleQuotes(value); field.setValue(value); } } } private static String removeDoubleQuotes(String string) { if (string.length() <= 2) return ""; return string.substring(1, string.length() - 1); } private static String convertToQuotedString(String string) { return "\"" + string + "\""; } /** * see {@link android.net.wifi.WifiManager#addOrUpdateNetwork(WifiConfiguration)} * @return the supplicant-assigned identifier for the new or updated Loading Loading @@ -731,7 +741,7 @@ public class WifiService extends IWifiManager.Stub { !WifiNative.setNetworkVariableCommand( netId, WifiConfiguration.ssidVarName, config.SSID)) { convertToQuotedString(config.SSID))) { if (DBG) { Log.d(TAG, "failed to set SSID: "+config.SSID); } Loading Loading @@ -894,7 +904,11 @@ public class WifiService extends IWifiManager.Stub { : config.enterpriseFields) { String varName = field.varName(); String value = field.value(); if ((value != null) && !WifiNative.setNetworkVariableCommand( if (value != null) { if (field != config.eap) { value = convertToQuotedString(value); } if (!WifiNative.setNetworkVariableCommand( netId, varName, value)) { Loading @@ -905,7 +919,7 @@ public class WifiService extends IWifiManager.Stub { break setVariables; } } } return netId; } Loading