Rename validated to everValidated.

This is a straight rename and thus a complete no-op from a
functionality perspective.

Bug: 18777225
Change-Id: I140d7640f1460c869a311294873772819a7a7059
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 788b5d3..3387c0f 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -1048,7 +1048,7 @@
             synchronized (nai) {
                 if (nai.created) {
                     NetworkCapabilities nc = new NetworkCapabilities(nai.networkCapabilities);
-                    if (nai.validated) {
+                    if (nai.everValidated) {
                         nc.addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED);
                     } else {
                         nc.removeCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED);
@@ -1956,8 +1956,8 @@
                         boolean valid = (msg.arg1 == NetworkMonitor.NETWORK_TEST_RESULT_VALID);
                         if (valid) {
                             if (DBG) log("Validated " + nai.name());
-                            if (!nai.validated) {
-                                nai.validated = true;
+                            if (!nai.everValidated) {
+                                nai.everValidated = true;
                                 rematchNetworkAndRequests(nai, NascentState.JUST_VALIDATED,
                                     ReapUnvalidatedNetworks.REAP);
                                 // If score has changed, rebroadcast to NetworkFactories. b/17726566
@@ -3984,7 +3984,7 @@
     private void rematchNetworkAndRequests(NetworkAgentInfo newNetwork, NascentState nascent,
             ReapUnvalidatedNetworks reapUnvalidatedNetworks) {
         if (!newNetwork.created) return;
-        if (nascent == NascentState.JUST_VALIDATED && !newNetwork.validated) {
+        if (nascent == NascentState.JUST_VALIDATED && !newNetwork.everValidated) {
             loge("ERROR: nascent network not validated.");
         }
         boolean keep = newNetwork.isVPN();
@@ -4054,7 +4054,7 @@
         }
         // Linger any networks that are no longer needed.
         for (NetworkAgentInfo nai : affectedNetworks) {
-            boolean teardown = !nai.isVPN() && nai.validated;
+            boolean teardown = !nai.isVPN() && nai.everValidated;
             for (int i = 0; i < nai.networkRequests.size() && teardown; i++) {
                 NetworkRequest nr = nai.networkRequests.valueAt(i);
                 try {
@@ -4096,7 +4096,7 @@
                     mLegacyTypeTracker.remove(oldDefaultNetwork.networkInfo.getType(),
                                               oldDefaultNetwork);
                 }
-                mDefaultInetConditionPublished = newNetwork.validated ? 100 : 0;
+                mDefaultInetConditionPublished = newNetwork.everValidated ? 100 : 0;
                 mLegacyTypeTracker.add(newNetwork.networkInfo.getType(), newNetwork);
                 notifyLockdownVpn(newNetwork);
             }
@@ -4139,7 +4139,7 @@
         }
         if (reapUnvalidatedNetworks == ReapUnvalidatedNetworks.REAP) {
             for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
-                if (!nai.created || nai.validated || nai.isVPN()) continue;
+                if (!nai.created || nai.everValidated || nai.isVPN()) continue;
                 boolean reap = true;
                 for (NetworkRequestInfo nri : mNetworkRequests.values()) {
                     // If this Network is already the highest scoring Network for a request, or if
@@ -4202,7 +4202,7 @@
 
     private void updateInetCondition(NetworkAgentInfo nai, boolean valid) {
         // Don't bother updating until we've graduated to validated at least once.
-        if (!nai.validated) return;
+        if (!nai.everValidated) return;
         // For now only update icons for default connection.
         // TODO: Update WiFi and cellular icons separately. b/17237507
         if (!isDefaultNetwork(nai)) return;
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index 779a834..94a8c0f 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -53,7 +53,7 @@
     // default NetworkRequest in which case validation will not be attempted.
     // NOTE: This is a sticky bit; once set it is never cleared even if future validation attempts
     // fail.
-    public boolean validated;
+    public boolean everValidated;
 
     // This represents the last score received from the NetworkAgent.
     private int currentScore;
@@ -89,7 +89,7 @@
         networkMonitor = new NetworkMonitor(context, handler, this, defaultRequest);
         networkMisc = misc;
         created = false;
-        validated = false;
+        everValidated = false;
     }
 
     public void addRequest(NetworkRequest networkRequest) {
@@ -114,7 +114,7 @@
 
         int score = currentScore;
 
-        if (!validated && !pretendValidated) score -= UNVALIDATED_SCORE_PENALTY;
+        if (!everValidated && !pretendValidated) score -= UNVALIDATED_SCORE_PENALTY;
         if (score < 0) score = 0;
 
         if (networkMisc.explicitlySelected) score = EXPLICITLY_SELECTED_NETWORK_SCORE;
@@ -143,7 +143,7 @@
                 network + "}  lp{" +
                 linkProperties + "}  nc{" +
                 networkCapabilities + "}  Score{" + getCurrentScore() + "} " +
-                "validated{" + validated + "} created{" + created + "} " +
+                "everValidated{" + everValidated + "} created{" + created + "} " +
                 "explicitlySelected{" + networkMisc.explicitlySelected + "} }";
     }