From b11071ccf5dd291b8a66955b7fd454b4658b2c6a Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Fri, 20 Mar 2020 01:32:03 -0700 Subject: [WifiTrackerLib] Allow privacy setting for Passpoint entries Test: manual build and visual verification, atest WifiTrackerLibTests Bug: 70983952 Change-Id: Ie40db4dfe47df529287a50347387837fc1a3c2b1 --- .../src/com/android/wifitrackerlib/PasspointWifiEntry.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libs') 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 -- cgit v1.2.3