Remove some unneeded WifiConfiguration time stamps

Removed mConnectChoiceTimestamp, creationTime, updateTime.

Bug: 146460486
Test: atest FrameworksWifiApiTests
Change-Id: Ic638a40b9d962bbeb7e193d61f3f510c96bc2680
This commit is contained in:
Michael Plass
2020-01-14 15:42:44 -08:00
parent 997d76d8bc
commit a0d404b1b8

View File

@@ -852,18 +852,6 @@ public class WifiConfiguration implements Parcelable {
@UnsupportedAppUsage
public int numNoInternetAccessReports;
/**
* @hide
* For debug: date at which the config was last updated
*/
public String updateTime;
/**
* @hide
* For debug: date at which the config was last updated
*/
public String creationTime;
/**
* @hide
* The WiFi configuration is considered to have no internet access for purpose of autojoining
@@ -1484,12 +1472,6 @@ public class WifiConfiguration implements Parcelable {
*/
private String mConnectChoice;
/**
* The system timestamp when we records the connectChoice. This value is obtained from
* System.currentTimeMillis
*/
private long mConnectChoiceTimestamp = INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP;
/**
* Used to cache the temporary candidate during the network selection procedure. It will be
* kept updating once a new scan result has a higher score than current one
@@ -1593,25 +1575,6 @@ public class WifiConfiguration implements Parcelable {
mConnectChoice = newConnectChoice;
}
/**
* get the timeStamp when user select a choice over this configuration
* @return returns when current connectChoice is set (time from System.currentTimeMillis)
* @hide
*/
public long getConnectChoiceTimestamp() {
return mConnectChoiceTimestamp;
}
/**
* set the timeStamp when user select a choice over this configuration
* @param timeStamp, the timestamp set to connectChoiceTimestamp, expected timestamp should
* be obtained from System.currentTimeMillis
* @hide
*/
public void setConnectChoiceTimestamp(long timeStamp) {
mConnectChoiceTimestamp = timeStamp;
}
/** Get the current Quality network selection status as a String (for debugging). */
@NonNull
public String getNetworkStatusString() {
@@ -1841,7 +1804,6 @@ public class WifiConfiguration implements Parcelable {
setCandidate(source.getCandidate());
setCandidateScore(source.getCandidateScore());
setConnectChoice(source.getConnectChoice());
setConnectChoiceTimestamp(source.getConnectChoiceTimestamp());
setHasEverConnected(source.getHasEverConnected());
}
@@ -1858,7 +1820,6 @@ public class WifiConfiguration implements Parcelable {
if (getConnectChoice() != null) {
dest.writeInt(CONNECT_CHOICE_EXISTS);
dest.writeString(getConnectChoice());
dest.writeLong(getConnectChoiceTimestamp());
} else {
dest.writeInt(CONNECT_CHOICE_NOT_EXISTS);
}
@@ -1877,10 +1838,8 @@ public class WifiConfiguration implements Parcelable {
setNetworkSelectionBSSID(in.readString());
if (in.readInt() == CONNECT_CHOICE_EXISTS) {
setConnectChoice(in.readString());
setConnectChoiceTimestamp(in.readLong());
} else {
setConnectChoice(null);
setConnectChoiceTimestamp(INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP);
}
setHasEverConnected(in.readInt() != 0);
}
@@ -2103,9 +2062,6 @@ public class WifiConfiguration implements Parcelable {
}
if (mNetworkSelectionStatus.getConnectChoice() != null) {
sbuf.append(" connect choice: ").append(mNetworkSelectionStatus.getConnectChoice());
sbuf.append(" connect choice set time: ")
.append(logTimeOfDay(
mNetworkSelectionStatus.getConnectChoiceTimestamp()));
}
sbuf.append(" hasEverConnected: ")
.append(mNetworkSelectionStatus.getHasEverConnected()).append("\n");
@@ -2117,12 +2073,6 @@ public class WifiConfiguration implements Parcelable {
sbuf.append(" numNoInternetAccessReports ");
sbuf.append(this.numNoInternetAccessReports).append("\n");
}
if (this.updateTime != null) {
sbuf.append(" update ").append(this.updateTime).append("\n");
}
if (this.creationTime != null) {
sbuf.append(" creation ").append(this.creationTime).append("\n");
}
if (this.validatedInternetAccess) sbuf.append(" validatedInternetAccess");
if (this.ephemeral) sbuf.append(" ephemeral");
if (this.osu) sbuf.append(" osu");
@@ -2669,8 +2619,6 @@ public class WifiConfiguration implements Parcelable {
allowAutojoin = source.allowAutojoin;
numNoInternetAccessReports = source.numNoInternetAccessReports;
noInternetAccessExpected = source.noInternetAccessExpected;
creationTime = source.creationTime;
updateTime = source.updateTime;
shared = source.shared;
recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
mRandomizedMacAddress = source.mRandomizedMacAddress;