summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-08-18 11:16:42 -0700
committerJean-Baptiste Queru <jbq@google.com>2010-08-18 11:16:42 -0700
commitf93951851052f14e3263adff22266b61f487b018 (patch)
treee8b99e272f7f31383f5e37da7d35372ace92386a /wifi
parent09f672509b78344258f1b0d9f021d2ec99942515 (diff)
downloadframeworks_base-f93951851052f14e3263adff22266b61f487b018.zip
frameworks_base-f93951851052f14e3263adff22266b61f487b018.tar.gz
frameworks_base-f93951851052f14e3263adff22266b61f487b018.tar.bz2
Revert "- updates NetUtils to use new libnetutils headers"
This reverts commit 9bf3bb21c097cc96f30d9bf3ec7dea62a74a738b.
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiNative.java6
-rw-r--r--wifi/java/android/net/wifi/WifiStateTracker.java17
2 files changed, 20 insertions, 3 deletions
diff --git a/wifi/java/android/net/wifi/WifiNative.java b/wifi/java/android/net/wifi/WifiNative.java
index e08f857..7a3282c 100644
--- a/wifi/java/android/net/wifi/WifiNative.java
+++ b/wifi/java/android/net/wifi/WifiNative.java
@@ -16,6 +16,8 @@
package android.net.wifi;
+import android.net.DhcpInfo;
+
/**
* Native calls for sending requests to the supplicant daemon, and for
* receiving asynchronous events. All methods of the form "xxxxCommand()"
@@ -143,6 +145,10 @@ public class WifiNative {
public native static boolean clearBlacklistCommand();
+ public native static boolean doDhcpRequest(DhcpInfo results);
+
+ public native static String getDhcpError();
+
/**
* Wait for the supplicant to send an event, returning the event string.
* @return the event string sent by the supplicant.
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 3d980ac..05d6e17 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -316,6 +316,8 @@ public class WifiStateTracker extends NetworkStateTracker {
private static String[] sDnsPropNames;
private Runnable mReleaseWakeLockCallback;
+ private static String[] sDnsPropNames;
+
/**
* A structure for supplying information about a supplicant state
* change in the STATE_CHANGE event message that comes from the
@@ -372,9 +374,9 @@ public class WifiStateTracker extends NetworkStateTracker {
mSettingsObserver = new SettingsObserver(new Handler());
mInterfaceName = SystemProperties.get("wifi.interface", "tiwlan0");
- mDnsPropNames = new String[] {
- "net." + mInterfaceName + ".dns1",
- "net." + mInterfaceName + ".dns2"
+ sDnsPropNames = new String[] {
+ "dhcp." + mInterfaceName + ".dns1",
+ "dhcp." + mInterfaceName + ".dns2"
};
mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo"));
@@ -419,6 +421,15 @@ public class WifiStateTracker extends NetworkStateTracker {
}
/**
+ * Return the IP addresses of the DNS servers available for the WLAN
+ * network interface.
+ * @return a list of DNS addresses, with no holes.
+ */
+ public String[] getNameServers() {
+ return getNameServerList(sDnsPropNames);
+ }
+
+ /**
* Return the name of our WLAN network interface.
* @return the name of our interface.
*/