OSDN Git Service

Allow NetworkAgent "immutable updates" to NetworkCapabilities
authorHugo Benichi <hugobenichi@google.com>
Wed, 16 Aug 2017 04:19:04 +0000 (13:19 +0900)
committerHugo Benichi <hugobenichi@google.com>
Wed, 16 Aug 2017 09:30:30 +0000 (18:30 +0900)
commitbae105a5ccd11430bab14721d1325e2303a673da
treeb0d952e4e15240b8868da9768e96bcdd37d1672d
parentc06dbc114f839112f1132e1e0edac8533b3f4c54
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
core/java/android/net/NetworkCapabilities.java
services/core/java/com/android/server/ConnectivityService.java