DO NOT MERGE Extending DNS event reporting

This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
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 unit and CTS

Bug: 29748723

(cherry picked from commit 14c9d2d0df)

Change-Id: I3941b8d6fc1dd578e2af6ed4d3c3d0a722c39918
This commit is contained in:
Michal Karpinski
2016-09-27 17:13:57 +01:00
parent 3db0a14ab0
commit 70444d3ad5
2 changed files with 5 additions and 2 deletions

View File

@@ -134,7 +134,9 @@ public class NetdEventListenerService extends INetdEventListener.Stub {
@Override @Override
// Called concurrently by multiple binder threads. // Called concurrently by multiple binder threads.
public synchronized void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs) { // This method must not block or perform long-running operations.
public synchronized void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs,
String hostname, String[] ipAddresses, int ipAddressesCount, int uid) {
maybeVerboseLog(String.format("onDnsEvent(%d, %d, %d, %d)", maybeVerboseLog(String.format("onDnsEvent(%d, %d, %d, %d)",
netId, eventType, returnCode, latencyMs)); netId, eventType, returnCode, latencyMs));

View File

@@ -158,7 +158,8 @@ public class NetdEventListenerServiceTest extends TestCase {
void log(int netId, int[] latencies) { void log(int netId, int[] latencies) {
for (int l : latencies) { for (int l : latencies) {
mNetdEventListenerService.onDnsEvent(netId, EVENT_TYPE, RETURN_CODE, l); mNetdEventListenerService.onDnsEvent(netId, EVENT_TYPE, RETURN_CODE, l, null, null, 0,
0);
} }
} }