From 1c052333578dda2d9a0536144c2a8b35db41059a Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 2 Dec 2019 14:19:21 -0800 Subject: XmlUtil: Use public IpConfiguration APIs Bug: 145232020 Test: Compiles Change-Id: I9dd7fc07c0cb285d3a29a17182b763f4f7803b46 --- .../com/android/server/wifi/WifiConfigManager.java | 2 +- .../java/com/android/server/wifi/util/XmlUtil.java | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 084161f68..44711096d 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -485,7 +485,7 @@ public class WifiConfigManager { * @return */ private boolean shouldUseAggressiveRandomization(WifiConfiguration config) { - if (config.getIpConfiguration().ipAssignment == IpConfiguration.IpAssignment.STATIC) { + if (config.getIpConfiguration().getIpAssignment() == IpConfiguration.IpAssignment.STATIC) { return false; } if (mDeviceConfigFacade.isAggressiveMacRandomizationSsidWhitelistEnabled()) { diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java index eab53bf0b..a2f69b285 100644 --- a/service/java/com/android/server/wifi/util/XmlUtil.java +++ b/service/java/com/android/server/wifi/util/XmlUtil.java @@ -834,43 +834,43 @@ public class XmlUtil { throws XmlPullParserException, IOException { // Write IP assignment settings XmlUtil.writeNextValue(out, XML_TAG_IP_ASSIGNMENT, - ipConfiguration.ipAssignment.toString()); - switch (ipConfiguration.ipAssignment) { + ipConfiguration.getIpAssignment().toString()); + switch (ipConfiguration.getIpAssignment()) { case STATIC: writeStaticIpConfigurationToXml( out, ipConfiguration.getStaticIpConfiguration()); break; default: Log.w(TAG, "Ignoring unknown ip assignment type: " - + ipConfiguration.proxySettings); + + ipConfiguration.getIpAssignment()); break; } // Write proxy settings XmlUtil.writeNextValue( out, XML_TAG_PROXY_SETTINGS, - ipConfiguration.proxySettings.toString()); - switch (ipConfiguration.proxySettings) { + ipConfiguration.getProxySettings().toString()); + switch (ipConfiguration.getProxySettings()) { case STATIC: XmlUtil.writeNextValue( out, XML_TAG_PROXY_HOST, - ipConfiguration.httpProxy.getHost()); + ipConfiguration.getHttpProxy().getHost()); XmlUtil.writeNextValue( out, XML_TAG_PROXY_PORT, - ipConfiguration.httpProxy.getPort()); + ipConfiguration.getHttpProxy().getPort()); XmlUtil.writeNextValue( out, XML_TAG_PROXY_EXCLUSION_LIST, generateProxyExclusionListString( - ipConfiguration.httpProxy.getExclusionList())); + ipConfiguration.getHttpProxy().getExclusionList())); break; case PAC: XmlUtil.writeNextValue( out, XML_TAG_PROXY_PAC_FILE, - ipConfiguration.httpProxy.getPacFileUrl().toString()); + ipConfiguration.getHttpProxy().getPacFileUrl().toString()); break; default: Log.w(TAG, "Ignoring unknown proxy settings type: " - + ipConfiguration.proxySettings); + + ipConfiguration.getProxySettings()); break; } } -- cgit v1.2.3