Merge "Do not deduce VCN capability if Builder is derived from request"

This commit is contained in:
Treehugger Robot
2021-04-21 14:06:14 +00:00
committed by Gerrit Code Review

View File

@@ -220,6 +220,10 @@ public class NetworkRequest implements Parcelable {
public Builder(@NonNull final NetworkRequest request) {
Objects.requireNonNull(request);
mNetworkCapabilities = request.networkCapabilities;
// If the caller constructed the builder from a request, it means the user
// might explicitly want the capabilities from the request. Thus, the NOT_VCN_MANAGED
// capabilities should not be touched later.
mModifiedNotVcnManaged = true;
}
/**