diff options
author | Quang Luong <qal@google.com> | 2019-09-06 13:57:24 -0700 |
---|---|---|
committer | Quang Luong <qal@google.com> | 2019-09-09 15:05:56 -0700 |
commit | 55333840da2f7129b5a2d2e78b612c1101baa9ee (patch) | |
tree | 51d6c08bec240eab8d52cc38de25a9d14c31deee /tests | |
parent | 5cb2d16dcc76b3f087b48cbf3fb1e0e7f48c8edc (diff) |
[Mainline Upstream] Add "[IBSS]" string to ScanResult#capabilities
Added "[IBSS]" to the ScanResult capabilities string in case the IBSS
field is set in the network's capability information.
Bug: 134722025
Test: atest InformationElementUtilTest
Change-Id: Id8884c0156397e21d1a558a810d83eeaf26ff474
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
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 dd567053c..011283b79 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java @@ -775,6 +775,24 @@ public class InformationElementUtilTest { } /** + * Test Capabilities.generateCapabilitiesString() with the IBSS capability bit set. + * + * Expect the function to return a string with [IBSS] there. + */ + @Test + public void buildCapabilities_IbssCapabilitySet() { + BitSet beaconCap = new BitSet(16); + beaconCap.set(1); + + InformationElementUtil.Capabilities capabilities = + new InformationElementUtil.Capabilities(); + capabilities.from(new InformationElement[0], beaconCap, false); + String result = capabilities.generateCapabilitiesString(); + + assertEquals("[IBSS]", result); + } + + /** * Verify the expectations when building an ExtendedCapabilites IE from data with no bits set. * Both ExtendedCapabilities#isStrictUtf8() and ExtendedCapabilites#is80211McRTTResponder() * should return false. |