diff options
author | Roshan Pius <rpius@google.com> | 2020-04-30 11:18:22 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2020-04-30 11:18:22 -0700 |
commit | ebe8480d17af649474b9dd03ce78e76064be23ea (patch) | |
tree | ff1b1a8574575f581a1a0ced8e7bfbf0fe664363 /tests | |
parent | 11f1b3d49fc0c96e73eae0c993edda46228bba13 (diff) |
ClientModeImpl: Only randomize MAC address at start if feature enabled
Bug: 155014563
Test: atest com.android.server.wifi
Change-Id: Iba72b268387c5c1c6fd9e90fddbcea695ba3cc88
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 8f36770e6..3e904af02 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -3853,6 +3853,16 @@ public class ClientModeImplTest extends WifiBaseTest { } /** + * Verify the MAC address is being randomized at start to prevent leaking the factory MAC. + */ + @Test + public void testNoRandomizeMacAddressOnStartIfMacRandomizationNotEnabled() throws Exception { + mResources.setBoolean(R.bool.config_wifi_connected_mac_randomization_supported, false); + loadComponentsInStaMode(); + verify(mWifiNative, never()).setMacAddress(anyString(), any()); + } + + /** * Verify bugreport will be taken when get IP_REACHABILITY_LOST */ @Test |