diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-04-30 22:08:17 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-30 22:08:17 +0000 |
commit | 0873158f6912b5f438cc07edb5b1494a41dc9d1b (patch) | |
tree | 72deaa2656f4d548b7278f0ebd4292a9d39349b4 /service | |
parent | 84151d5f046698807902bbcff2b896a0ea55b71b (diff) | |
parent | cae4ac63eaecb06a44d6512dc83ed7a8158b606a (diff) |
Merge "ClientModeImpl: Only randomize MAC address at start if feature enabled" into rvc-dev am: be1d76775b am: cae4ac63ea
Change-Id: If6a6b699d2364991611185e6da1f9e120fdde2e4
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 7314bb853..49edc366a 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -3585,7 +3585,9 @@ public class ClientModeImpl extends StateMachine { mLastSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mLastSimBasedConnectionCarrierName = null; mLastSignalLevel = -1; - mWifiNative.setMacAddress(mInterfaceName, MacAddressUtils.createRandomUnicastAddress()); + if (isConnectedMacRandomizationEnabled()) { + mWifiNative.setMacAddress(mInterfaceName, MacAddressUtils.createRandomUnicastAddress()); + } mWifiInfo.setMacAddress(mWifiNative.getMacAddress(mInterfaceName)); // TODO: b/79504296 This broadcast has been deprecated and should be removed sendSupplicantConnectionChangedBroadcast(true); |