Merge "Only actually log the DNS events we have." into nyc-dev

am: cb98809657

* commit 'cb988096570de8af4883ae3bdea06c88f8fd235a':
  Only actually log the DNS events we have.

Change-Id: I97340d6b0483961d848e6f604a112636000675af
This commit is contained in:
Lorenzo Colitti
2016-05-23 09:10:52 +00:00
committed by android-build-merger

View File

@@ -78,9 +78,11 @@ public class DnsEventListenerService extends IDnsEventListener.Stub {
return;
}
// Only log as many events as we actually have.
byte[] eventTypes = Arrays.copyOf(mEventTypes, mEventCount);
byte[] returnCodes = Arrays.copyOf(mReturnCodes, mEventCount);
int[] latenciesMs = Arrays.copyOf(mLatenciesMs, mEventCount);
DnsEvent.logEvent(mNetId, mEventTypes, mReturnCodes, mLatenciesMs);
DnsEvent.logEvent(mNetId, eventTypes, returnCodes, latenciesMs);
maybeLog(String.format("Logging %d results for netId %d", mEventCount, mNetId));
mEventCount = 0;
}