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

Commit cf65493f authored by Oscar Shu's avatar Oscar Shu Committed by Android (Google) Code Review
Browse files

Merge changes from topics "macRandWhitelist", "paranoidSsidOptIn"

* changes:
  [Mac rand] recording when the randomized mac is last changed
  [MAC rand] add feature flag for aggressive mode per SSID
parents 2099cbac 29ffdcb6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -746,6 +746,9 @@
    <!-- Indicates that p2p MAC randomization is supported on this device -->
    <bool translatable="false" name="config_wifi_p2p_mac_randomization_supported">false</bool>

    <!-- flag for activating paranoid MAC randomization on a limited set of SSIDs -->
    <bool translatable="false" name="config_wifi_aggressive_randomization_ssid_whitelist_enabled">false</bool>

    <!-- Indicates that wifi link probing is supported on this device -->
    <bool translatable="false" name="config_wifi_link_probing_supported">false</bool>

+1 −0
Original line number Diff line number Diff line
@@ -1966,6 +1966,7 @@
  <java-symbol type="bool" name="config_wifi_local_only_hotspot_5ghz" />
  <java-symbol type="bool" name="config_wifi_connected_mac_randomization_supported" />
  <java-symbol type="bool" name="config_wifi_p2p_mac_randomization_supported" />
  <java-symbol type="bool" name="config_wifi_aggressive_randomization_ssid_whitelist_enabled" />
  <java-symbol type="bool" name="config_wifi_link_probing_supported" />
  <java-symbol type="bool" name="config_wifi_fast_bss_transition_enabled" />
  <java-symbol type="bool" name="config_wimaxEnabled" />
+12 −0
Original line number Diff line number Diff line
@@ -1029,6 +1029,13 @@ public class WifiConfiguration implements Parcelable {
    @NonNull
    private MacAddress mRandomizedMacAddress;

    /**
     * @hide
     * The wall clock time of when |mRandomizedMacAddress| last changed.
     * Used to determine when we should re-randomize in aggressive mode.
     */
    public long randomizedMacLastModifiedTimeMs = 0;

    /**
     * @hide
     * Checks if the given MAC address can be used for Connected Mac Randomization
@@ -1908,6 +1915,8 @@ public class WifiConfiguration implements Parcelable {
        }
        sbuf.append(" macRandomizationSetting: ").append(macRandomizationSetting).append("\n");
        sbuf.append(" mRandomizedMacAddress: ").append(mRandomizedMacAddress).append("\n");
        sbuf.append(" randomizedMacLastModifiedTimeMs: ").append(randomizedMacLastModifiedTimeMs)
                .append("\n");
        sbuf.append(" KeyMgmt:");
        for (int k = 0; k < this.allowedKeyManagement.size(); k++) {
            if (this.allowedKeyManagement.get(k)) {
@@ -2429,6 +2438,7 @@ public class WifiConfiguration implements Parcelable {
            recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
            mRandomizedMacAddress = source.mRandomizedMacAddress;
            macRandomizationSetting = source.macRandomizationSetting;
            randomizedMacLastModifiedTimeMs = source.randomizedMacLastModifiedTimeMs;
            requirePMF = source.requirePMF;
            updateIdentifier = source.updateIdentifier;
        }
@@ -2502,6 +2512,7 @@ public class WifiConfiguration implements Parcelable {
        dest.writeParcelable(mRandomizedMacAddress, flags);
        dest.writeInt(macRandomizationSetting);
        dest.writeInt(osu ? 1 : 0);
        dest.writeLong(randomizedMacLastModifiedTimeMs);
    }

    /** Implement the Parcelable interface {@hide} */
@@ -2575,6 +2586,7 @@ public class WifiConfiguration implements Parcelable {
                config.mRandomizedMacAddress = in.readParcelable(null);
                config.macRandomizationSetting = in.readInt();
                config.osu = in.readInt() != 0;
                config.randomizedMacLastModifiedTimeMs = in.readLong();
                return config;
            }