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:
Robert Greenwalt
2011-07-28 17:21:25 -07:00
parent 9520d6af5a
commit f3ab069bec

View File

@@ -80,9 +80,9 @@ public class LinkProperties implements Parcelable {
public LinkProperties(LinkProperties source) { public LinkProperties(LinkProperties source) {
if (source != null) { if (source != null) {
mIfaceName = source.getInterfaceName(); mIfaceName = source.getInterfaceName();
mLinkAddresses = source.getLinkAddresses(); for (LinkAddress l : source.getLinkAddresses()) mLinkAddresses.add(l);
mDnses = source.getDnses(); for (InetAddress i : source.getDnses()) mDnses.add(i);
mRoutes = source.getRoutes(); for (RouteInfo r : source.getRoutes()) mRoutes.add(r);
mHttpProxy = (source.getHttpProxy() == null) ? mHttpProxy = (source.getHttpProxy() == null) ?
null : new ProxyProperties(source.getHttpProxy()); null : new ProxyProperties(source.getHttpProxy());
} }