Add per network static IP settings
Remove the existing global static IP settings and add support
for per network configuration
Change-Id: I5a6d8b877471b8c8ad07951c96d273893754607f
diff --git a/core/java/android/net/DhcpInfo.java b/core/java/android/net/DhcpInfo.java
index 1178bec..9c81c19 100644
--- a/core/java/android/net/DhcpInfo.java
+++ b/core/java/android/net/DhcpInfo.java
@@ -37,6 +37,19 @@
super();
}
+ /** copy constructor {@hide} */
+ public DhcpInfo(DhcpInfo source) {
+ if (source != null) {
+ ipAddress = source.ipAddress;
+ gateway = source.gateway;
+ netmask = source.netmask;
+ dns1 = source.dns1;
+ dns2 = source.dns2;
+ serverAddress = source.serverAddress;
+ leaseDuration = source.leaseDuration;
+ }
+ }
+
public String toString() {
StringBuffer str = new StringBuffer();
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index e1c84ef..5b4aedb 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1128,6 +1128,7 @@
*/
public static final int WIFI_SLEEP_POLICY_NEVER = 2;
+ //TODO: deprecate static IP constants
/**
* Whether to use static IP and other static network attributes.
* <p>