Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 793a6eac authored by Cosmo Hsieh's avatar Cosmo Hsieh Committed by Android (Google) Code Review
Browse files

Merge "Implemen WiFi MAC randomization api for WiFi MAC randomization preference."

parents 0f82fe6e be92eb0f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public class WifiPrivacyPreferenceController extends BasePreferenceController im
    @Override
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        if (mWifiConfiguration != null) {
            //TODO(b/117957974): update MAC randomization level to WifiManager
            mWifiConfiguration.macRandomizationSetting = Integer.parseInt((String) newValue);
            mWifiManager.updateNetwork(mWifiConfiguration);
        }
        updateSummary((DropDownPreference) preference, Integer.parseInt((String) newValue));
@@ -77,10 +77,9 @@ public class WifiPrivacyPreferenceController extends BasePreferenceController im
    @VisibleForTesting
    int getRandomizationValue() {
        if (mWifiConfiguration != null) {
            //TODO(b/117957974): get real MAC randomization level from WifiManager
            return 0;
            return mWifiConfiguration.macRandomizationSetting;
        }
        return 0;
        return WifiConfiguration.RANDOMIZATION_PERSISTENT;
    }

    private void updateSummary(DropDownPreference preference, int macRandomized) {