Merge "NetworkRequest.Builder should create a defensive copy of capabilities"
This commit is contained in:
commit
e19ca2ac69
1 changed files with 1 additions and 1 deletions
|
|
@ -220,7 +220,7 @@ public class NetworkRequest implements Parcelable {
|
|||
*/
|
||||
public Builder(@NonNull final NetworkRequest request) {
|
||||
Objects.requireNonNull(request);
|
||||
mNetworkCapabilities = request.networkCapabilities;
|
||||
mNetworkCapabilities = new NetworkCapabilities(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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue