diff options
| author | Lorenzo Colitti <lorenzo@google.com> | 2014-07-31 00:48:01 +0900 |
|---|---|---|
| committer | Lorenzo Colitti <lorenzo@google.com> | 2014-08-19 11:59:43 -0700 |
| commit | 0a82e80073e193725a9d4c84a93db8a04b2456b9 (patch) | |
| tree | 0fc1bb0fab2818df4175215e88ac52372e20bc66 /core/java/android/net/EthernetManager.java | |
| parent | 3a6eba01c48363f675090bd8e0f853a7fbf2165d (diff) | |
Stop using LinkProperties for static configuration.
LinkProperties can represent way more complicated configurations
than what we can actually apply to interfaces. This makes it
error-prone to use it to represent static configuration, both
when trying to apply configuration coming from LinkProperties
and when trying to save configuration from current
LinkProperties.
Instead, move static configuration (IPv4 only, since we don't
support static IPv6 configuration) into a separate
StaticIpConfiguration class.
Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
Diffstat (limited to 'core/java/android/net/EthernetManager.java')
| -rw-r--r-- | core/java/android/net/EthernetManager.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/java/android/net/EthernetManager.java b/core/java/android/net/EthernetManager.java index 608ca28d84e1..d965f27c8fea 100644 --- a/core/java/android/net/EthernetManager.java +++ b/core/java/android/net/EthernetManager.java @@ -21,7 +21,6 @@ import android.net.IEthernetManager; import android.net.IpConfiguration; import android.net.IpConfiguration.IpAssignment; import android.net.IpConfiguration.ProxySettings; -import android.net.LinkProperties; import android.os.RemoteException; /** @@ -52,16 +51,12 @@ public class EthernetManager { */ public IpConfiguration getConfiguration() { if (mService == null) { - return new IpConfiguration(IpAssignment.UNASSIGNED, - ProxySettings.UNASSIGNED, - new LinkProperties()); + return new IpConfiguration(); } try { return mService.getConfiguration(); } catch (RemoteException e) { - return new IpConfiguration(IpAssignment.UNASSIGNED, - ProxySettings.UNASSIGNED, - new LinkProperties()); + return new IpConfiguration(); } } |
