summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-12-04 21:43:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-12-04 21:43:03 +0000
commit27fc5ec251e42b45094604e03c578243b69d3e91 (patch)
treec798c35be42766ac8a01b7e450570d5784fd1d45 /tests
parent9a090f9497b92cceece5ed493644855d6348fc0b (diff)
parentdd67b710d037fa23a35de33814ba40bb9765f5bf (diff)
Merge "Remove references to @hide MacAddress.ALL_ZEROS_ADDRESS"
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java11
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java28
2 files changed, 20 insertions, 19 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
index 567a2b7ad..d2e6f1f78 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
@@ -23,6 +23,7 @@ import android.net.IpConfiguration;
import android.net.MacAddress;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiEnterpriseConfig;
+import android.net.wifi.WifiManager;
import android.net.wifi.WifiNetworkSpecifier;
import android.net.wifi.WifiScanner;
import android.os.PatternMatcher;
@@ -569,7 +570,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest {
public void testValidateNetworkSpecifierPositiveCases_SsidPattern() {
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
new PatternMatcher(TEST_SSID, PatternMatcher.PATTERN_LITERAL),
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS),
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS),
WifiConfigurationTestUtil.createOpenNetwork(),
TEST_UID, TEST_PACKAGE);
assertTrue(WifiConfigurationUtil.validateNetworkSpecifier(specifier));
@@ -611,7 +612,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest {
public void testValidateNetworkSpecifierNegativeCases_NoSsidBssid() {
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
new PatternMatcher(".*", PatternMatcher.PATTERN_SIMPLE_GLOB),
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS),
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS),
WifiConfigurationTestUtil.createOpenNetwork(),
TEST_UID, TEST_PACKAGE);
assertFalse(WifiConfigurationUtil.validateNetworkSpecifier(specifier));
@@ -625,7 +626,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest {
public void testValidateNetworkSpecifierNegativeCases_MatchNoneSsidPattern() {
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
new PatternMatcher("", PatternMatcher.PATTERN_LITERAL),
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS),
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS),
WifiConfigurationTestUtil.createOpenNetwork(),
TEST_UID, TEST_PACKAGE);
assertFalse(WifiConfigurationUtil.validateNetworkSpecifier(specifier));
@@ -653,7 +654,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest {
public void testValidateNetworkSpecifierNegativeCases_InvalidBssidPattern() {
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
new PatternMatcher(TEST_SSID, PatternMatcher.PATTERN_LITERAL),
- Pair.create(MacAddress.fromString(TEST_BSSID), MacAddress.ALL_ZEROS_ADDRESS),
+ Pair.create(MacAddress.fromString(TEST_BSSID), WifiManager.ALL_ZEROS_MAC_ADDRESS),
WifiConfigurationTestUtil.createOpenNetwork(),
TEST_UID, TEST_PACKAGE);
assertFalse(WifiConfigurationUtil.validateNetworkSpecifier(specifier));
@@ -667,7 +668,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest {
public void testValidateNetworkSpecifierNegativeCases_NoSsidPatternForHiddenNetwork() {
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
new PatternMatcher(TEST_SSID, PatternMatcher.PATTERN_PREFIX),
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS),
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS),
WifiConfigurationTestUtil.createOpenHiddenNetwork(),
TEST_UID, TEST_PACKAGE);
assertFalse(WifiConfigurationUtil.validateNetworkSpecifier(specifier));
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
index 461476fce..8a8d52efe 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
@@ -723,7 +723,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -766,7 +766,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -809,7 +809,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_PREFIX);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -942,7 +942,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -989,7 +989,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_3, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -1029,7 +1029,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -1150,7 +1150,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_PREFIX);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createPskNetwork();
wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY;
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -1303,7 +1303,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY;
@@ -2263,7 +2263,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
// match-all.
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
ssidPatternMatch, bssidPatternMatch, WifiConfigurationTestUtil.createPskNetwork(),
TEST_UID_1, TEST_PACKAGE_NAME_1);
@@ -2307,7 +2307,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
Pair.create(MacAddress.fromString(matchingScanResult.BSSID),
- MacAddress.ALL_ZEROS_ADDRESS);
+ WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
ssidPatternMatch, bssidPatternMatch, WifiConfigurationTestUtil.createPskNetwork(),
TEST_UID_1, TEST_PACKAGE_NAME_1);
@@ -2350,7 +2350,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
Pair.create(MacAddress.fromString(matchingScanResult.BSSID),
- MacAddress.ALL_ZEROS_ADDRESS);
+ WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
ssidPatternMatch, bssidPatternMatch, WifiConfigurationTestUtil.createPskNetwork(),
TEST_UID_1, TEST_PACKAGE_NAME_1);
@@ -2644,7 +2644,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -2730,7 +2730,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(targetSsid, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createPskNetwork();
wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY;
WifiNetworkSpecifier specifier = new WifiNetworkSpecifier(
@@ -2799,7 +2799,7 @@ public class WifiNetworkFactoryTest extends WifiBaseTest {
PatternMatcher ssidPatternMatch =
new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
Pair<MacAddress, MacAddress> bssidPatternMatch =
- Pair.create(MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
+ Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
WifiConfiguration wifiConfiguration;
if (isHidden) {
wifiConfiguration = WifiConfigurationTestUtil.createPskHiddenNetwork();