summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorQuang Luong <qal@google.com>2020-03-20 01:32:03 -0700
committerQuang Luong <qal@google.com>2020-03-20 01:42:01 -0700
commitb11071ccf5dd291b8a66955b7fd454b4658b2c6a (patch)
tree9bd3eba122f413b668d3850a94708a78cde44cfe /libs
parent5189259cfb40237570b3db131712c22fe7860b75 (diff)
[WifiTrackerLib] Allow privacy setting for Passpoint entries
Test: manual build and visual verification, atest WifiTrackerLibTests Bug: 70983952 Change-Id: Ie40db4dfe47df529287a50347387837fc1a3c2b1
Diffstat (limited to 'libs')
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java
index b607180fc..b26d035da 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/PasspointWifiEntry.java
@@ -340,20 +340,21 @@ public class PasspointWifiEntry extends WifiEntry {
@Override
public boolean canSetPrivacy() {
- // TODO(b/70983952): Fill this method in
- return false;
+ return true;
}
@Override
@Privacy
public int getPrivacy() {
- // TODO(b/70983952): Fill this method in
- return PRIVACY_UNKNOWN;
+ return mPasspointConfig.isMacRandomizationEnabled()
+ ? PRIVACY_RANDOMIZED_MAC : PRIVACY_DEVICE_MAC;
}
@Override
public void setPrivacy(int privacy) {
- // TODO(b/70983952): Fill this method in
+ mWifiManager.setMacRandomizationSettingPasspointEnabled(
+ mPasspointConfig.getHomeSp().getFqdn(),
+ privacy == PRIVACY_DEVICE_MAC ? false : true);
}
@Override