Make copy-constructor make deep copy.
Used to grab immutables but now will copy the data so the result is mutable and we don't get crashes. bug:5051667 Change-Id: I0878bf8c58069055f528121541d1911f404cbe49
This commit is contained in:
@@ -80,9 +80,9 @@ public class LinkProperties implements Parcelable {
|
||||
public LinkProperties(LinkProperties source) {
|
||||
if (source != null) {
|
||||
mIfaceName = source.getInterfaceName();
|
||||
mLinkAddresses = source.getLinkAddresses();
|
||||
mDnses = source.getDnses();
|
||||
mRoutes = source.getRoutes();
|
||||
for (LinkAddress l : source.getLinkAddresses()) mLinkAddresses.add(l);
|
||||
for (InetAddress i : source.getDnses()) mDnses.add(i);
|
||||
for (RouteInfo r : source.getRoutes()) mRoutes.add(r);
|
||||
mHttpProxy = (source.getHttpProxy() == null) ?
|
||||
null : new ProxyProperties(source.getHttpProxy());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user