Add CTS API coverage for APIs which are used by NetworkStack
Change-Id: I4f6c34f3bcfa65e60cf73fc1b7cab2d83c32836a
Bug: 129200003
Bug: 129200292
Bug: 129199996
Bug: 129200261
Bug: 129200513
Bug: 129200316
Bug: 129200589
Bug: 129200181
Bug: 129200669
Bug: 129200504
Bug: 129200478
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index 013e353..77908e6 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -101,6 +101,14 @@
Decoder.constants.get(eventType), durationMs);
}
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj.getClass().equals(IpManagerEvent.class))) return false;
+ final IpManagerEvent other = (IpManagerEvent) obj;
+ return eventType == other.eventType
+ && durationMs == other.durationMs;
+ }
+
final static class Decoder {
static final SparseArray<String> constants = MessageUtils.findMessageNames(
new Class[]{IpManagerEvent.class},