diff options
author | Oscar Shu <xshu@google.com> | 2020-04-24 04:47:27 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-24 04:47:27 +0000 |
commit | 1eaf23c9d8b5caa4e2079082b666ccbe6044a528 (patch) | |
tree | 3dfd7cb6813a25d8a313fc490ed22f1cceef0b43 /service | |
parent | adb1e3f0bb2cf8c349bc71b577e5c758bbc89851 (diff) | |
parent | 65d9ad5fd183f58dd2a962913148fef1bb612d08 (diff) |
Merge "Randomize sta MAC address upon start" into rvc-dev am: 65d9ad5fd1
Change-Id: Iae044a78baa8cf216f0be5d056f8a3d5b47583f1
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 63ebf9824..cf8acb4f0 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -67,6 +67,7 @@ import android.net.shared.Inet4AddressUtils; import android.net.shared.Layer2Information; import android.net.shared.ProvisioningConfiguration; import android.net.shared.ProvisioningConfiguration.ScanResultInfo; +import android.net.util.MacAddressUtils; import android.net.util.NetUtils; import android.net.wifi.IActionListener; import android.net.wifi.INetworkRequestMatchCallback; @@ -3555,6 +3556,7 @@ public class ClientModeImpl extends StateMachine { mLastSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mLastSimBasedConnectionCarrierName = null; mLastSignalLevel = -1; + mWifiNative.setMacAddress(mInterfaceName, MacAddressUtils.createRandomUnicastAddress()); mWifiInfo.setMacAddress(mWifiNative.getMacAddress(mInterfaceName)); // TODO: b/79504296 This broadcast has been deprecated and should be removed sendSupplicantConnectionChangedBroadcast(true); |