Merge "[MAC rand] Repurpose existing field"

This commit is contained in:
Oscar Shu
2019-10-29 19:54:58 +00:00
committed by Android (Google) Code Review

View File

@@ -1046,10 +1046,10 @@ public class WifiConfiguration implements Parcelable {
/**
* @hide
* The wall clock time of when |mRandomizedMacAddress| last changed.
* Used to determine when we should re-randomize in aggressive mode.
* The wall clock time of when |mRandomizedMacAddress| should be re-randomized in aggressive
* randomization mode.
*/
public long randomizedMacLastModifiedTimeMs = 0;
public long randomizedMacExpirationTimeMs = 0;
/**
* @hide
@@ -1910,8 +1910,9 @@ 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(" randomizedMacExpirationTimeMs: ")
.append(randomizedMacExpirationTimeMs == 0 ? "<none>"
: TimeUtils.logTimeOfDay(randomizedMacExpirationTimeMs)).append("\n");
sbuf.append(" KeyMgmt:");
for (int k = 0; k < this.allowedKeyManagement.size(); k++) {
if (this.allowedKeyManagement.get(k)) {
@@ -2439,7 +2440,7 @@ public class WifiConfiguration implements Parcelable {
recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
mRandomizedMacAddress = source.mRandomizedMacAddress;
macRandomizationSetting = source.macRandomizationSetting;
randomizedMacLastModifiedTimeMs = source.randomizedMacLastModifiedTimeMs;
randomizedMacExpirationTimeMs = source.randomizedMacExpirationTimeMs;
requirePMF = source.requirePMF;
updateIdentifier = source.updateIdentifier;
}
@@ -2515,7 +2516,7 @@ public class WifiConfiguration implements Parcelable {
dest.writeParcelable(mRandomizedMacAddress, flags);
dest.writeInt(macRandomizationSetting);
dest.writeInt(osu ? 1 : 0);
dest.writeLong(randomizedMacLastModifiedTimeMs);
dest.writeLong(randomizedMacExpirationTimeMs);
}
/** Implement the Parcelable interface {@hide} */
@@ -2591,7 +2592,7 @@ public class WifiConfiguration implements Parcelable {
config.mRandomizedMacAddress = in.readParcelable(null);
config.macRandomizationSetting = in.readInt();
config.osu = in.readInt() != 0;
config.randomizedMacLastModifiedTimeMs = in.readLong();
config.randomizedMacExpirationTimeMs = in.readLong();
return config;
}