IpConn metrics: distinguish NUD_FAILED answers
This patch adds in IpReachabilityMonitor a timestamp variable set
everytime that probeAll() send NUD probe requests to RTNETLINK.
This allows to distinguish between:
1) NUD_FAILED events resulting from such a forced NUD probe
2) "organic" NUD_FAILED notifications from the kernel
This distinction is added to IpReachabilityEvent as a one-bit flag.
This patch also changes the formatting of ApfProgramEvent flags to use
'|' as a joining character, similarly to other flags formatting.
Bug: 21859053
Change-Id: I24c64a3f17fa283eace5bd0a05c21a90a2305359
diff --git a/core/java/android/net/metrics/ApfProgramEvent.java b/core/java/android/net/metrics/ApfProgramEvent.java
index e322dc1..258d8e1 100644
--- a/core/java/android/net/metrics/ApfProgramEvent.java
+++ b/core/java/android/net/metrics/ApfProgramEvent.java
@@ -124,7 +124,7 @@
for (int bit = set.nextSetBit(0); bit >= 0; bit = set.nextSetBit(bit+1)) {
names.add(Decoder.constants.get(bit));
}
- return TextUtils.join(", ", names);
+ return TextUtils.join("|", names);
}
final static class Decoder {