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 /wifi/java | |
parent | 3a6eba01c48363f675090bd8e0f853a7fbf2165d (diff) | |
download | frameworks_base-0a82e80073e193725a9d4c84a93db8a04b2456b9.zip frameworks_base-0a82e80073e193725a9d4c84a93db8a04b2456b9.tar.gz frameworks_base-0a82e80073e193725a9d4c84a93db8a04b2456b9.tar.bz2 |
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 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 3c37b94..ac2a176 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -21,7 +21,7 @@ import android.net.IpConfiguration; import android.net.IpConfiguration.ProxySettings; import android.net.IpConfiguration.IpAssignment; import android.net.ProxyInfo; -import android.net.LinkProperties; +import android.net.StaticIpConfiguration; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; @@ -1096,13 +1096,13 @@ public class WifiConfiguration implements Parcelable { } /** @hide */ - public LinkProperties getLinkProperties() { - return mIpConfiguration.linkProperties; + public StaticIpConfiguration getStaticIpConfiguration() { + return mIpConfiguration.getStaticIpConfiguration(); } /** @hide */ - public void setLinkProperties(LinkProperties linkProperties) { - mIpConfiguration.linkProperties = linkProperties; + public void setStaticIpConfiguration(StaticIpConfiguration staticIpConfiguration) { + mIpConfiguration.setStaticIpConfiguration(staticIpConfiguration); } /** @hide */ @@ -1126,9 +1126,19 @@ public class WifiConfiguration implements Parcelable { } /** @hide */ + public ProxyInfo getHttpProxy() { + return mIpConfiguration.httpProxy; + } + + /** @hide */ + public void setHttpProxy(ProxyInfo httpProxy) { + mIpConfiguration.httpProxy = httpProxy; + } + + /** @hide */ public void setProxy(ProxySettings settings, ProxyInfo proxy) { mIpConfiguration.proxySettings = settings; - mIpConfiguration.linkProperties.setHttpProxy(proxy); + mIpConfiguration.httpProxy = proxy; } /** Implement the Parcelable interface {@hide} */ |