diff options
author | Isabelle Taylor <taylori@google.com> | 2020-02-14 13:42:37 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-02-14 13:42:37 +0000 |
commit | 5c4b6301d5c0410270d7ea996c43e153240a5b1b (patch) | |
tree | 90392a2849b3769b35ca97cacbd4ac41f84878e3 /wifi/tests | |
parent | e21d0ea642a9c481b004449b0c2e6d03fb696422 (diff) | |
parent | a996b06b6f28878e29badb9c3f8ac132ec39f86b (diff) |
Merge "Revert "Remove framework code that has moved to frameworks/libs/net""
Diffstat (limited to 'wifi/tests')
-rw-r--r-- | wifi/tests/src/android/net/wifi/WifiConfigurationTest.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java index 15aa3cc4a355..ba9fc786afe7 100644 --- a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java +++ b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; import android.net.MacAddress; -import android.net.util.MacAddressUtils; import android.net.wifi.WifiConfiguration.KeyMgmt; import android.net.wifi.WifiConfiguration.NetworkSelectionStatus; import android.os.Parcel; @@ -63,8 +62,7 @@ public class WifiConfigurationTest { config.updateIdentifier = "1234"; config.fromWifiNetworkSpecifier = true; config.fromWifiNetworkSuggestion = true; - config.setRandomizedMacAddress(MacAddressUtils.createRandomUnicastAddress()); - MacAddress macBeforeParcel = config.getRandomizedMacAddress(); + MacAddress macBeforeParcel = config.getOrCreateRandomizedMacAddress(); Parcel parcelW = Parcel.obtain(); config.writeToParcel(parcelW, 0); byte[] bytes = parcelW.marshall(); @@ -77,7 +75,7 @@ public class WifiConfigurationTest { // lacking a useful config.equals, check two fields near the end. assertEquals(cookie, reconfig.getMoTree()); - assertEquals(macBeforeParcel, reconfig.getRandomizedMacAddress()); + assertEquals(macBeforeParcel, reconfig.getOrCreateRandomizedMacAddress()); assertEquals(config.updateIdentifier, reconfig.updateIdentifier); assertFalse(reconfig.trusted); assertTrue(config.fromWifiNetworkSpecifier); @@ -213,7 +211,7 @@ public class WifiConfigurationTest { MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS); assertEquals(defaultMac, config.getRandomizedMacAddress()); - MacAddress macToChangeInto = MacAddressUtils.createRandomUnicastAddress(); + MacAddress macToChangeInto = MacAddress.createRandomUnicastAddress(); config.setRandomizedMacAddress(macToChangeInto); MacAddress macAfterChange = config.getRandomizedMacAddress(); |