summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorRicky Wai <rickywai@google.com>2017-10-27 14:46:01 +0100
committerHugo Benichi <hugobenichi@google.com>2017-11-12 22:27:35 +0900
commit77518fbbc4ba32201745909d279d4048214936e5 (patch)
tree9de414134d6d4f68d86e397edb5c2c8dcefce7c6 /core/java
parent8d742759cc025ce4c03baef9d9d0822bd0e5bbf6 (diff)
Add Network security watchlist service
Partial cherry pick from commit 1a6e667cb6e9211908d02eb21c50c006473376f9 adding a new INetdEventCallback type. Bug: 63908748 Test: built, flashed, $ runtest frameworks-net Change-Id: I1b95cc4e5cbbfbdbd7429d61e2dcb67b90d278bb Merged-In: I09595178bac0070a867bc5e0501a7bf2c840e398
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/IIpConnectivityMetrics.aidl6
-rw-r--r--core/java/android/net/INetdEventCallback.aidl4
2 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/net/IIpConnectivityMetrics.aidl b/core/java/android/net/IIpConnectivityMetrics.aidl
index 6f07b3153833..aeaf09d8fafe 100644
--- a/core/java/android/net/IIpConnectivityMetrics.aidl
+++ b/core/java/android/net/IIpConnectivityMetrics.aidl
@@ -30,11 +30,11 @@ interface IIpConnectivityMetrics {
int logEvent(in ConnectivityMetricsEvent event);
/**
- * At most one callback can be registered (by DevicePolicyManager).
+ * Callback can be registered by DevicePolicyManager or NetworkWatchlistService only.
* @return status {@code true} if registering/unregistering of the callback was successful,
* {@code false} otherwise (might happen if IIpConnectivityMetrics is not available,
* if it happens make sure you call it when the service is up in the caller)
*/
- boolean registerNetdEventCallback(in INetdEventCallback callback);
- boolean unregisterNetdEventCallback();
+ boolean addNetdEventCallback(in int callerType, in INetdEventCallback callback);
+ boolean removeNetdEventCallback(in int callerType);
}
diff --git a/core/java/android/net/INetdEventCallback.aidl b/core/java/android/net/INetdEventCallback.aidl
index 49436beadc51..1fd9423b6128 100644
--- a/core/java/android/net/INetdEventCallback.aidl
+++ b/core/java/android/net/INetdEventCallback.aidl
@@ -19,6 +19,10 @@ package android.net;
/** {@hide} */
oneway interface INetdEventCallback {
+ // Possible addNetdEventCallback callers.
+ const int CALLBACK_CALLER_DEVICE_POLICY = 0;
+ const int CALLBACK_CALLER_NETWORK_WATCHLIST = 1;
+
/**
* Reports a single DNS lookup function call.
* This method must not block or perform long-running operations.