summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2018-03-13 11:58:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-03-13 11:58:19 +0000
commit40ca5a06bf9e8b9622158956c45ae303bbd21469 (patch)
tree91880d52195c5df4418daa372e5f3ddb93a11c3e /core/java
parent6fc1a2f0d4f6a44d5a0ccc91a1e1c8d152b94879 (diff)
parent99c5029b91f17c46acd219a317b48b3ac0fe9a90 (diff)
Merge "Add new netd event callback for changes to private DNS validation state."
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/INetdEventCallback.aidl17
-rw-r--r--core/java/com/android/server/net/BaseNetdEventCallback.java6
2 files changed, 21 insertions, 2 deletions
diff --git a/core/java/android/net/INetdEventCallback.aidl b/core/java/android/net/INetdEventCallback.aidl
index 1fd9423b6128..1e75bf461a70 100644
--- a/core/java/android/net/INetdEventCallback.aidl
+++ b/core/java/android/net/INetdEventCallback.aidl
@@ -20,8 +20,9 @@ package android.net;
oneway interface INetdEventCallback {
// Possible addNetdEventCallback callers.
- const int CALLBACK_CALLER_DEVICE_POLICY = 0;
- const int CALLBACK_CALLER_NETWORK_WATCHLIST = 1;
+ const int CALLBACK_CALLER_CONNECTIVITY_SERVICE = 0;
+ const int CALLBACK_CALLER_DEVICE_POLICY = 1;
+ const int CALLBACK_CALLER_NETWORK_WATCHLIST = 2;
/**
* Reports a single DNS lookup function call.
@@ -39,6 +40,18 @@ oneway interface INetdEventCallback {
int uid);
/**
+ * Represents a private DNS validation success or failure.
+ * This method must not block or perform long-running operations.
+ *
+ * @param netId the ID of the network the validation was performed on.
+ * @param ipAddress the IP address for which validation was performed.
+ * @param hostname the hostname for which validation was performed.
+ * @param validated whether or not validation was successful.
+ */
+ void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname,
+ boolean validated);
+
+ /**
* Reports a single connect library call.
* This method must not block or perform long-running operations.
*
diff --git a/core/java/com/android/server/net/BaseNetdEventCallback.java b/core/java/com/android/server/net/BaseNetdEventCallback.java
index 3d3a3d07b216..fdba2f3dc9e6 100644
--- a/core/java/com/android/server/net/BaseNetdEventCallback.java
+++ b/core/java/com/android/server/net/BaseNetdEventCallback.java
@@ -32,6 +32,12 @@ public class BaseNetdEventCallback extends INetdEventCallback.Stub {
}
@Override
+ public void onPrivateDnsValidationEvent(int netId, String ipAddress,
+ String hostname, boolean validated) {
+ // default no-op
+ }
+
+ @Override
public void onConnectEvent(String ipAddr, int port, long timestamp, int uid) {
// default no-op
}