diff options
author | Roshan Pius <rpius@google.com> | 2018-05-16 11:23:01 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-05-16 11:23:01 -0700 |
commit | 35b49ffad94e7e7d7769db2a4aea0057640165fa (patch) | |
tree | 01fdde6cd8120ae00e034ea12dcc8975941c9f60 | |
parent | d0b1c6de370037885cf0da1eb202efff23c746b4 (diff) |
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
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 2 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | 2 |
2 files changed, 4 insertions, 0 deletions
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); } /** diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 4cccc88c9..844a358d0 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -3607,6 +3607,8 @@ public class WifiConfigManagerTest { configuration.status = WifiConfiguration.Status.DISABLED; configuration.getNetworkSelectionStatus().setNetworkSelectionStatus( NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED); + configuration.getNetworkSelectionStatus().setNetworkSelectionDisableReason( + NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER); } /** |