summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-30 21:51:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-30 21:51:15 +0000
commitcae4ac63eaecb06a44d6512dc83ed7a8158b606a (patch)
treeb4ee6c4b662d244a5a7bd4d2d892e681290d50bf /service
parent092d52862339c48d024cec4b5f4296ecd118d4fe (diff)
parentbe1d76775b438a5316611a77dbf0989e73037cf9 (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.java4
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);