summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2020-05-12 20:46:19 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-12 20:46:19 +0000
commit7cd72bfcd15e94399b4f5e78ed30f4b863945471 (patch)
treee19524017def727281d7e27d684621c024fdcc8f /service
parent1334e0ea9cc044e636c28092cdf12b50815795fa (diff)
parentab4727b0e46bc6428f529e5a8490f483c47a545c (diff)
Merge "Avoid changing wifi mac address when device does not support randomization" into rvc-dev am: ddc1ace90c am: ab4727b0e4
Change-Id: I39f32b5be904efb7f858fd15279b226f678fc933
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index b1a7d3e8b..879b98d13 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -6375,12 +6375,12 @@ public class ClientModeImpl extends StateMachine {
config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
}
- if (config.macRandomizationSetting
- == WifiConfiguration.RANDOMIZATION_PERSISTENT
- && isConnectedMacRandomizationEnabled()) {
- configureRandomizedMacAddress(config);
- } else {
- setCurrentMacToFactoryMac(config);
+ if (isConnectedMacRandomizationEnabled()) {
+ if (config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_PERSISTENT) {
+ configureRandomizedMacAddress(config);
+ } else {
+ setCurrentMacToFactoryMac(config);
+ }
}
if (config.enterpriseConfig != null