Revert "NetworkRequest.Builder should create a defensive copy of capabilities"
This reverts commit f1ab80ea6281ddda256af5e04c0b50e114521c40.
Reason for revert: DroidMonitor: Potential culprit for Bug 233698500 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I7de63e0a3656194b94b29e28862c62fc300dfdfa
diff --git a/framework/src/android/net/NetworkRequest.java b/framework/src/android/net/NetworkRequest.java
index 6245e07..4f9d845 100644
--- a/framework/src/android/net/NetworkRequest.java
+++ b/framework/src/android/net/NetworkRequest.java
@@ -220,7 +220,7 @@
*/
public Builder(@NonNull final NetworkRequest request) {
Objects.requireNonNull(request);
- mNetworkCapabilities = new NetworkCapabilities(request.networkCapabilities);
+ 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.