summaryrefslogtreecommitdiffstats
path: root/core/java/android/net
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-05-14 17:28:27 +0900
committerLorenzo Colitti <lorenzo@google.com>2015-05-19 18:29:02 +0900
commit76f67797032981ccb63e12e808ebc8bda636a740 (patch)
tree3aeb71ce9bd1d9852616184a425d1e13a704e3e4 /core/java/android/net
parentc6767354c5c2e32648c7404b73878a8ae66dd3c8 (diff)
downloadframeworks_base-76f67797032981ccb63e12e808ebc8bda636a740.zip
frameworks_base-76f67797032981ccb63e12e808ebc8bda636a740.tar.gz
frameworks_base-76f67797032981ccb63e12e808ebc8bda636a740.tar.bz2
Make NET_CAPABILITY_VALIDATED (almost) a first-class citizen.
1. Always keep ConnectivityService's validated bits current: - Apply the validated bit whenever a NetworkAgent updates its NetworkCapabilities. - Set or clear the validated bit whenever lastValidated changes. 2. Send callbacks when the validation state of a network changes. 3. Delete getNetworkCapabilitiesAndValidation, removing code duplication with getNetworkCapabilities. 4. Add the validated bit to NetworkCapabilities#toString. Bug: 18591282 Bug: 20081183 Change-Id: I6aa53b61c15cc137f203f9fc6bbd4c16894be750
Diffstat (limited to 'core/java/android/net')
-rw-r--r--core/java/android/net/NetworkCapabilities.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index ab70485..cf747cf 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -619,6 +619,7 @@ public final class NetworkCapabilities implements Parcelable {
case NET_CAPABILITY_NOT_RESTRICTED: capabilities += "NOT_RESTRICTED"; break;
case NET_CAPABILITY_TRUSTED: capabilities += "TRUSTED"; break;
case NET_CAPABILITY_NOT_VPN: capabilities += "NOT_VPN"; break;
+ case NET_CAPABILITY_VALIDATED: capabilities += "VALIDATED"; break;
}
if (++i < types.length) capabilities += "&";
}