From 35b49ffad94e7e7d7769db2a4aea0057640165fa Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Wed, 16 May 2018 11:23:01 -0700 Subject: WifiConfigManager: Explcitly set the disable reason for new networks New networks added start out with network selection "status" marked disabled, also set the "disable reason" explicitly to be consistent. Note: This does not fix any issues other than the discrepancy noticed between "status" and "disable reason" in network selection status. Bug: 79750205 Test: Unit tests Change-Id: I4be4e3d1719bc34b62e527294e0d59b3dd1b1627 --- service/java/com/android/server/wifi/WifiConfigManager.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 336ebbd16..982c48a48 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -898,6 +898,8 @@ public class WifiConfigManager { configuration.status = WifiConfiguration.Status.DISABLED; configuration.getNetworkSelectionStatus().setNetworkSelectionStatus( NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED); + configuration.getNetworkSelectionStatus().setNetworkSelectionDisableReason( + NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER); } /** -- cgit v1.2.3