diff options
| author | Hugo Benichi <hugobenichi@google.com> | 2017-08-16 13:19:04 +0900 |
|---|---|---|
| committer | Hugo Benichi <hugobenichi@google.com> | 2017-08-16 18:30:30 +0900 |
| commit | bae105a5ccd11430bab14721d1325e2303a673da (patch) | |
| tree | b0d952e4e15240b8868da9768e96bcdd37d1672d /core/java/android | |
| parent | c06dbc114f839112f1132e1e0edac8533b3f4c54 (diff) | |
Allow NetworkAgent "immutable updates" to NetworkCapabilities
This patch loosens the validation checks when a NetworkAgent updates it
NetworkCapabilities: instead of checking that capabilities labeled as
"immutable" stay identical across updates, it is now accepted to change
immutable capabilities in a way that the new NetworkCapabilities
satisfies the old NetworkCapabilities.
This allows a NetworkAgent to update itself in order to match more
requests, but will still catch NetworkAgents that sends degradation
updates causing potentially requests to not match anymore.
Bug: 64125969
Test: runtest frameworks-net
Change-Id: I2a1b3f9c0be6415e40edc989d0c1b03b5631f7b1
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/net/NetworkCapabilities.java | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index 0b9289345dbe..4bb884405360 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -770,7 +770,6 @@ public final class NetworkCapabilities implements Parcelable { StringJoiner joiner = new StringJoiner(", "); - // TODO: consider only enforcing that capabilities are not removed, allowing addition. // Ignore NOT_METERED being added or removed as it is effectively dynamic. http://b/63326103 // TODO: properly support NOT_METERED as a mutable and requestable capability. final long mask = ~MUTABLE_CAPABILITIES & ~(1 << NET_CAPABILITY_NOT_METERED); |
