am f5118c89: am ece4ac21: Merge "Don\'t mark NetworkRequests restricted when they don\'t have restricted caps" into lmp-dev
* commit 'f5118c89e004156082966518f379c8ac7e065d7f': Don't mark NetworkRequests restricted when they don't have restricted caps
This commit is contained in:
@@ -281,8 +281,12 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
public void maybeMarkCapabilitiesRestricted() {
|
||||
// If all the capabilities are typically provided by restricted networks, conclude that this
|
||||
// network is restricted.
|
||||
if ((mNetworkCapabilities & ~(DEFAULT_CAPABILITIES | RESTRICTED_CAPABILITIES)) == 0)
|
||||
if ((mNetworkCapabilities & ~(DEFAULT_CAPABILITIES | RESTRICTED_CAPABILITIES)) == 0 &&
|
||||
// Must have at least some restricted capabilities, otherwise a request for an
|
||||
// internet-less network will get marked restricted.
|
||||
(mNetworkCapabilities & RESTRICTED_CAPABILITIES) != 0) {
|
||||
removeCapability(NET_CAPABILITY_NOT_RESTRICTED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user