diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-04-30 21:51:15 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-30 21:51:15 +0000 |
commit | cae4ac63eaecb06a44d6512dc83ed7a8158b606a (patch) | |
tree | b4ee6c4b662d244a5a7bd4d2d892e681290d50bf /service | |
parent | 092d52862339c48d024cec4b5f4296ecd118d4fe (diff) | |
parent | be1d76775b438a5316611a77dbf0989e73037cf9 (diff) |
Merge "ClientModeImpl: Only randomize MAC address at start if feature enabled" into rvc-dev am: be1d76775b
Change-Id: I68f1868e76a5373439e0149a0021170cbe1633e7
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); |