diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 1588bf72c9694..b835f4c112d6b 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -1183,11 +1183,17 @@ public class WifiConfiguration implements Parcelable { /** * @hide - * The wall clock time of when |mRandomizedMacAddress| should be re-randomized in aggressive - * randomization mode. + * The wall clock time of when |mRandomizedMacAddress| should be re-randomized in enhanced + * MAC randomization mode. */ public long randomizedMacExpirationTimeMs = 0; + /** + * The wall clock time of when |mRandomizedMacAddress| is last modified. + * @hide + */ + public long randomizedMacLastModifiedTimeMs = 0; + /** * @hide * Checks if the given MAC address can be used for Connected Mac Randomization @@ -2258,6 +2264,9 @@ public class WifiConfiguration implements Parcelable { sbuf.append(" randomizedMacExpirationTimeMs: ") .append(randomizedMacExpirationTimeMs == 0 ? "" : logTimeOfDay(randomizedMacExpirationTimeMs)).append("\n"); + sbuf.append(" randomizedMacLastModifiedTimeMs: ") + .append(randomizedMacLastModifiedTimeMs == 0 ? "" + : logTimeOfDay(randomizedMacLastModifiedTimeMs)).append("\n"); sbuf.append(" KeyMgmt:"); for (int k = 0; k < this.allowedKeyManagement.size(); k++) { if (this.allowedKeyManagement.get(k)) { @@ -2803,6 +2812,7 @@ public class WifiConfiguration implements Parcelable { mRandomizedMacAddress = source.mRandomizedMacAddress; macRandomizationSetting = source.macRandomizationSetting; randomizedMacExpirationTimeMs = source.randomizedMacExpirationTimeMs; + randomizedMacLastModifiedTimeMs = source.randomizedMacLastModifiedTimeMs; requirePmf = source.requirePmf; updateIdentifier = source.updateIdentifier; carrierId = source.carrierId; @@ -2877,6 +2887,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(macRandomizationSetting); dest.writeInt(osu ? 1 : 0); dest.writeLong(randomizedMacExpirationTimeMs); + dest.writeLong(randomizedMacLastModifiedTimeMs); dest.writeInt(carrierId); dest.writeString(mPasspointUniqueId); } @@ -2951,6 +2962,7 @@ public class WifiConfiguration implements Parcelable { config.macRandomizationSetting = in.readInt(); config.osu = in.readInt() != 0; config.randomizedMacExpirationTimeMs = in.readLong(); + config.randomizedMacLastModifiedTimeMs = in.readLong(); config.carrierId = in.readInt(); config.mPasspointUniqueId = in.readString(); return config;