Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d8acea9 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

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
parent d20f60c8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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());
        }