diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 02b7a42d3878b..cd7bebc1fc562 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -1206,11 +1206,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 @@ -2281,6 +2287,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)) { @@ -2837,6 +2846,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; @@ -2911,6 +2921,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); } @@ -2985,6 +2996,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;