Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c429e71c authored by Michal Karpinski's avatar Michal Karpinski
Browse files

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 965894ee)

Change-Id: Ic27405cca56fbd99a281b74ac0a8981dc49ec896
parent 70444d3a
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -148,6 +148,14 @@ public class NetdEventListenerService extends INetdEventListener.Stub {
        batch.addResult((byte) eventType, (byte) returnCode, latencyMs);
        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) {
    public synchronized void dump(PrintWriter writer) {
        IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
        IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
        pw.println(TAG + ":");
        pw.println(TAG + ":");