From 801e4e9db30a337e3c38715df736868af44aa78b Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 22 Sep 2020 23:13:50 -0700 Subject: [WifiTrackerLib] Reset default route booleans in BaseWifiTracker#onStart The default route booleans must be reset to false in onStart() if there is no default route. Otherwise these booleans may still hold an out-of-date "true" value and the actual false->true update will not trigger handleOnDefaultRouteChanged, causing the X in the wifi signal icon to never disappear. Bug: 168885802 Test: Connect to network in wifi picker, open network details and disconnect, go back to wifi picker and connect to same network. Observe X in wifi signal icon to disappear after validation. Change-Id: Ifde41ec0436ae67c59f5b935b5bc4ff1cd357f57 --- .../WifiTrackerLib/src/com/android/wifitrackerlib/BaseWifiTracker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/BaseWifiTracker.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/BaseWifiTracker.java index 28b1a4907..8eaef6e5a 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/BaseWifiTracker.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/BaseWifiTracker.java @@ -273,6 +273,9 @@ public class BaseWifiTracker implements LifecycleObserver { if (defaultNetworkCapabilities != null) { mIsWifiDefaultRoute = defaultNetworkCapabilities.hasTransport(TRANSPORT_WIFI); mIsCellDefaultRoute = defaultNetworkCapabilities.hasTransport(TRANSPORT_CELLULAR); + } else { + mIsWifiDefaultRoute = false; + mIsCellDefaultRoute = false; } if (isVerboseLoggingEnabled()) { Log.v(mTag, "Wifi is the default route: " + mIsWifiDefaultRoute); -- cgit v1.2.3 From 846b99d62942975e7d76c59bf3514bca7528ec1f Mon Sep 17 00:00:00 2001 From: Kai Shi Date: Wed, 9 Sep 2020 21:52:06 -0700 Subject: Unit test for the new 6GHz channelization Move up 6GHz band start and end frequencies by 10MHz per IEEE 802.11ax draft 7.0 Annex E Table E-4. Add operating class 135 and 136. Cherry-picking unit test changes to rvc-qpr-dev. Bug: 167426957 Test: atest com.android.server.wifi Test: manual test with 6GHz capable STA and AP Change-Id: If0cb3dda1412f8ca3b3e8d7a3b6912f5ef15f6f5 Merged-In: I2c9eb3d704d68b37685363c230d67758c31e17a1 --- .../src/com/android/server/wifi/util/ApConfigUtilTest.java | 6 +++--- .../com/android/server/wifi/util/InformationElementUtilTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java index 16c915729..df85aa996 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java @@ -112,9 +112,9 @@ public class ApConfigUtilTest extends WifiBaseTest { 5845, SoftApConfiguration.BAND_5GHZ, 169, 5865, SoftApConfiguration.BAND_5GHZ, 173, /* Now some 6GHz channels */ - 5945, SoftApConfiguration.BAND_6GHZ, 1, - 5960, SoftApConfiguration.BAND_6GHZ, 4, - 6100, SoftApConfiguration.BAND_6GHZ, 32 + 5955, SoftApConfiguration.BAND_6GHZ, 1, + 5970, SoftApConfiguration.BAND_6GHZ, 4, + 6110, SoftApConfiguration.BAND_6GHZ, 32 }; private static final int[] EMPTY_CHANNEL_LIST = {}; diff --git a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java index a0d1da854..3d54e69d0 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java @@ -1367,7 +1367,7 @@ public class InformationElementUtilTest extends WifiBaseTest { assertTrue(heOperation.is6GhzInfoPresent()); assertFalse(heOperation.isVhtInfoPresent()); assertEquals(ScanResult.CHANNEL_WIDTH_80MHZ, heOperation.getChannelWidth()); - assertEquals(6040, heOperation.getCenterFreq0()); + assertEquals(6050, heOperation.getCenterFreq0()); assertEquals(0, heOperation.getCenterFreq1()); } @@ -1412,8 +1412,8 @@ public class InformationElementUtilTest extends WifiBaseTest { assertTrue(heOperation.is6GhzInfoPresent()); assertFalse(heOperation.isVhtInfoPresent()); assertEquals(ScanResult.CHANNEL_WIDTH_160MHZ, heOperation.getChannelWidth()); - assertEquals(6040, heOperation.getCenterFreq0()); - assertEquals(6080, heOperation.getCenterFreq1()); + assertEquals(6050, heOperation.getCenterFreq0()); + assertEquals(6090, heOperation.getCenterFreq1()); } /** -- cgit v1.2.3 From 7d7e35c61fd2665a5473e2bd23d63021a1148d2e Mon Sep 17 00:00:00 2001 From: Kai Shi Date: Wed, 23 Sep 2020 15:52:28 -0700 Subject: Revert unit test change for the new 6GHz channelization This is to revert unit test changes for these who stick with the old pre-built wifi apex which doesn't have the change of framework/base/wifi for the new 6G channelization. Bug: 167426957 Test: atest com.android.server.wifi Change-Id: I41cdcdbab4d0a45340e9df5a4e3193727c9878c4 Merged-In: I2c9eb3d704d68b37685363c230d67758c31e17a1 --- .../src/com/android/server/wifi/util/ApConfigUtilTest.java | 6 +++--- .../com/android/server/wifi/util/InformationElementUtilTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java index df85aa996..16c915729 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java @@ -112,9 +112,9 @@ public class ApConfigUtilTest extends WifiBaseTest { 5845, SoftApConfiguration.BAND_5GHZ, 169, 5865, SoftApConfiguration.BAND_5GHZ, 173, /* Now some 6GHz channels */ - 5955, SoftApConfiguration.BAND_6GHZ, 1, - 5970, SoftApConfiguration.BAND_6GHZ, 4, - 6110, SoftApConfiguration.BAND_6GHZ, 32 + 5945, SoftApConfiguration.BAND_6GHZ, 1, + 5960, SoftApConfiguration.BAND_6GHZ, 4, + 6100, SoftApConfiguration.BAND_6GHZ, 32 }; private static final int[] EMPTY_CHANNEL_LIST = {}; diff --git a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java index 3d54e69d0..a0d1da854 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java @@ -1367,7 +1367,7 @@ public class InformationElementUtilTest extends WifiBaseTest { assertTrue(heOperation.is6GhzInfoPresent()); assertFalse(heOperation.isVhtInfoPresent()); assertEquals(ScanResult.CHANNEL_WIDTH_80MHZ, heOperation.getChannelWidth()); - assertEquals(6050, heOperation.getCenterFreq0()); + assertEquals(6040, heOperation.getCenterFreq0()); assertEquals(0, heOperation.getCenterFreq1()); } @@ -1412,8 +1412,8 @@ public class InformationElementUtilTest extends WifiBaseTest { assertTrue(heOperation.is6GhzInfoPresent()); assertFalse(heOperation.isVhtInfoPresent()); assertEquals(ScanResult.CHANNEL_WIDTH_160MHZ, heOperation.getChannelWidth()); - assertEquals(6050, heOperation.getCenterFreq0()); - assertEquals(6090, heOperation.getCenterFreq1()); + assertEquals(6040, heOperation.getCenterFreq0()); + assertEquals(6080, heOperation.getCenterFreq1()); } /** -- cgit v1.2.3