diff options
| author | Robert Greenwalt <rgreenwalt@google.com> | 2014-04-07 19:48:39 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-07 19:48:39 +0000 |
| commit | e42ce676f54742f2d47c26adaa90407c2cb8cec8 (patch) | |
| tree | 13294a9831d59327211e08c190caa5a0d0039d29 /core/java | |
| parent | 1cb3c1d381c389c7ef903c1a871ff695cd406da4 (diff) | |
| parent | ebf23a8d9ef7eb2d14ef19bff5525eb16604da7c (diff) | |
am ebf23a8d: am 74acf23a: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit 'ebf23a8d9ef7eb2d14ef19bff5525eb16604da7c':
DO NOT MERGE Sanitize WifiConfigs
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/net/LinkProperties.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 75646fdf9090..bf411cccd5c9 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -112,6 +112,16 @@ public class LinkProperties implements Parcelable { return Collections.unmodifiableCollection(mLinkAddresses); } + /** + * Replaces the LinkAddresses on this link with the given collection of addresses + */ + public void setLinkAddresses(Collection<LinkAddress> addresses) { + mLinkAddresses.clear(); + for (LinkAddress address: addresses) { + addLinkAddress(address); + } + } + public void addDns(InetAddress dns) { if (dns != null) mDnses.add(dns); } @@ -127,6 +137,16 @@ public class LinkProperties implements Parcelable { return Collections.unmodifiableCollection(mRoutes); } + /** + * Replaces the RouteInfos on this link with the given collection of RouteInfos. + */ + public void setRoutes(Collection<RouteInfo> routes) { + mRoutes.clear(); + for (RouteInfo route : routes) { + addRoute(route); + } + } + public void setHttpProxy(ProxyProperties proxy) { mHttpProxy = proxy; } |
