summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-09 20:44:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-04-09 20:44:41 +0000
commitb9e042d647ff9f0249151d774db05d1c44c026f9 (patch)
tree7b4f5a7874b913d88441c01d6e7f32370d6a8047 /service
parente75e4299ad619f0150fc52fa4ea56cd88e0a91b9 (diff)
parent6e62a783342be8f3cde6404f93aa1b65a26609c9 (diff)
Merge "Add flag to enable enhanced mac randomization" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 309f54f60..90c7f42c2 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -198,6 +198,9 @@ public class WifiConfigManager {
@VisibleForTesting
public static final int SCAN_RESULT_MISSING_COUNT_THRESHOLD = 1;
+ @VisibleForTesting
+ protected static final String ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG =
+ "enhanced_mac_randomization_force_enabled";
/**
* General sorting algorithm of all networks for scanning purposes:
@@ -423,6 +426,10 @@ public class WifiConfigManager {
|| config.macRandomizationSetting != WifiConfiguration.RANDOMIZATION_PERSISTENT) {
return false;
}
+ if (mFrameworkFacade.getIntegerSetting(mContext,
+ ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0) == 1) {
+ return true;
+ }
if (config.getIpConfiguration().getIpAssignment() == IpConfiguration.IpAssignment.STATIC) {
return false;
}