diff options
4 files changed, 11 insertions, 9 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index adcfae5e5..2c0887982 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -1571,7 +1571,7 @@ public class WifiConfigManager { != NetworkSelectionStatus.NETWORK_SELECTION_ENABLED) { localLog("setNetworkSelectionEnabled: configKey=" + config.getKey() + " old networkStatus=" + status.getNetworkStatusString() - + " disableReason=" + status.getNetworkDisableReasonString()); + + " disableReason=" + status.getNetworkSelectionDisableReasonString()); } status.setNetworkSelectionStatus( NetworkSelectionStatus.NETWORK_SELECTION_ENABLED); @@ -1659,7 +1659,7 @@ public class WifiConfigManager { } localLog("setNetworkSelectionStatus: configKey=" + config.getKey() + " networkStatus=" + networkStatus.getNetworkStatusString() + " disableReason=" - + networkStatus.getNetworkDisableReasonString()); + + networkStatus.getNetworkSelectionDisableReasonString()); saveToStore(false); return true; } @@ -1700,9 +1700,9 @@ public class WifiConfigManager { if (mVerboseLoggingEnabled) { Log.v(TAG, "Disable counter for network " + config.getPrintableSsid() + " for reason " - + NetworkSelectionStatus.getNetworkDisableReasonString(reason) + " is " - + networkStatus.getDisableReasonCounter(reason) + " and threshold is " - + disableReasonThreshold); + + NetworkSelectionStatus.getNetworkSelectionDisableReasonString(reason) + + " is " + networkStatus.getDisableReasonCounter(reason) + + " and threshold is " + disableReasonThreshold); } return true; } diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java index 59bc6dce8..dc8ac7843 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSelector.java +++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java @@ -609,7 +609,7 @@ public class WifiNetworkSelector { if (count > 0) { sbuf.append("reason=") .append(WifiConfiguration.NetworkSelectionStatus - .getNetworkDisableReasonString(index)) + .getNetworkSelectionDisableReasonString(index)) .append(", count=").append(count).append("; "); } } diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java index 06f8c4967..7c32634c0 100644 --- a/service/java/com/android/server/wifi/util/XmlUtil.java +++ b/service/java/com/android/server/wifi/util/XmlUtil.java @@ -1012,7 +1012,8 @@ public class XmlUtil { XmlUtil.writeNextValue( out, XML_TAG_SELECTION_STATUS, selectionStatus.getNetworkStatusString()); XmlUtil.writeNextValue( - out, XML_TAG_DISABLE_REASON, selectionStatus.getNetworkDisableReasonString()); + out, XML_TAG_DISABLE_REASON, + selectionStatus.getNetworkSelectionDisableReasonString()); XmlUtil.writeNextValue(out, XML_TAG_CONNECT_CHOICE, selectionStatus.getConnectChoice()); XmlUtil.writeNextValue( out, XML_TAG_HAS_EVER_CONNECTED, selectionStatus.hasEverConnected()); diff --git a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java index 6bbb4e945..8f8c01de2 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java @@ -336,7 +336,7 @@ public class XmlUtilTest extends WifiBaseTest { * Verify that a network selection disable reason deprecation is handled correctly during * restore of data after upgrade. * This test tries to simulate the scenario where we have a - * {@link NetworkSelectionStatus#getNetworkDisableReasonString()} ()} string stored + * {@link NetworkSelectionStatus#getNetworkSelectionDisableReasonString()} ()} string stored * in the XML file from a previous release which has now been deprecated. The network should * be restored as enabled. */ @@ -358,7 +358,8 @@ public class XmlUtilTest extends WifiBaseTest { // Now modify the disable reason string with some invalid string in XML data. String xmlString = new String(xmlData); String deprecatedXmlString = - xmlString.replaceAll(status.getNetworkDisableReasonString(), "DISABLED_DEPRECATED"); + xmlString.replaceAll(status.getNetworkSelectionDisableReasonString(), + "DISABLED_DEPRECATED"); // Ensure that the modification did take effect. assertFalse(xmlString.equals(deprecatedXmlString)); |