summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-10-31 11:59:46 +0900
committerLorenzo Colitti <lorenzo@google.com>2013-11-25 17:27:17 +0900
commit5ae4a531cc31be2868f65c40e8636658f1ae2f06 (patch)
treed2a5bf64fd3bb9ee4ddfa45ff44750459ead8d94 /core/java
parenta9626c1c956f51e7b4cb783d70b75abc3b180a00 (diff)
downloadframeworks_base-5ae4a531cc31be2868f65c40e8636658f1ae2f06.zip
frameworks_base-5ae4a531cc31be2868f65c40e8636658f1ae2f06.tar.gz
frameworks_base-5ae4a531cc31be2868f65c40e8636658f1ae2f06.tar.bz2
Pass DNS server info notifications to observers.
These are sent if the device receives IPv6 Router Advertisements with DNS server configuration options. Currently, nothing listens to them; in a future change we will use them as IPv6 DNS servers. [Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a] Bug: 9180552 Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/INetworkManagementEventObserver.aidl9
-rw-r--r--core/java/com/android/server/net/BaseNetworkObserver.java5
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/net/INetworkManagementEventObserver.aidl b/core/java/android/net/INetworkManagementEventObserver.aidl
index b76e4c2..c720c7b 100644
--- a/core/java/android/net/INetworkManagementEventObserver.aidl
+++ b/core/java/android/net/INetworkManagementEventObserver.aidl
@@ -90,4 +90,13 @@ interface INetworkManagementEventObserver {
* @param active True if the interface is actively transmitting data, false if it is idle.
*/
void interfaceClassDataActivityChanged(String label, boolean active);
+
+ /**
+ * Information about available DNS servers has been received.
+ *
+ * @param iface The interface on which the information was received.
+ * @param lifetime The time in seconds for which the DNS servers may be used.
+ * @param servers The IP addresses of the DNS servers.
+ */
+ void interfaceDnsServerInfo(String iface, long lifetime, in String[] servers);
}
diff --git a/core/java/com/android/server/net/BaseNetworkObserver.java b/core/java/com/android/server/net/BaseNetworkObserver.java
index fa54c5f..a02c602 100644
--- a/core/java/com/android/server/net/BaseNetworkObserver.java
+++ b/core/java/com/android/server/net/BaseNetworkObserver.java
@@ -64,4 +64,9 @@ public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub {
public void limitReached(String limitName, String iface) {
// default no-op
}
+
+ @Override
+ public void interfaceDnsServerInfo(String iface, long lifetime, String[] servers) {
+ // default no-op
+ }
}