summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michal Karpinski <mkarpinski@google.com> 2016-09-28 16:06:16 +0100
committer Michal Karpinski <mkarpinski@google.com> 2016-12-02 17:24:28 +0000
commitc429e71cfe6b515de1fadc4601b10f8e80a2d5ea (patch)
tree4c17d1f800f0a9a8d29a27a44e063a2cddac79e4
parent70444d3ad5091c068de61a773a5ca58a9274135b (diff)
DO NOT MERGE Add connect event reporting
Adds reporting of connect events including netId, destination IP address, destination port, uid and connect latency. Currently ignores the new data it receives, further work will be done in the subsequent CLs. Test: for now just the benchmarking, in the future CTS Bug: 29748723 (cherry picked from commit 965894eeb90c13255b5559b925d13fd22528f8cb) Change-Id: Ic27405cca56fbd99a281b74ac0a8981dc49ec896
-rw-r--r--services/core/java/com/android/server/connectivity/NetdEventListenerService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
index f97cc094e7ec..4b175d7a5af8 100644
--- a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
+++ b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
@@ -148,6 +148,14 @@ public class NetdEventListenerService extends INetdEventListener.Stub {
batch.addResult((byte) eventType, (byte) returnCode, latencyMs);
}
+ @Override
+ // Called concurrently by multiple binder threads.
+ // This method must not block or perform long-running operations.
+ public synchronized void onConnectEvent(int netId, int latencyMs, String ipAddr, int port,
+ int uid) {
+ maybeVerboseLog(String.format("onConnectEvent(%d, %d)", netId, latencyMs));
+ }
+
public synchronized void dump(PrintWriter writer) {
IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
pw.println(TAG + ":");