Add missed NSD event name
Some events are missed their name in the EVENT_NAMES array and
shows the number on dumpsys logs. Add their name to the event
array to show correct info.
Before:
rec[0]: time=04-12 15:15:23.553 processed=DefaultState org=EnabledState dest=<null> what=21
rec[1]: time=04-12 15:15:23.555 processed=EnabledState org=EnabledState dest=<null> what=REGISTER_SERVICE
rec[2]: time=04-12 15:15:24.375 processed=EnabledState org=EnabledState dest=<null> what=DISCOVER_SERVICES
rec[3]: time=04-12 15:15:25.338 processed=EnabledState org=EnabledState dest=<null> what=23
rec[4]: time=04-12 15:15:25.342 processed=EnabledState org=EnabledState dest=<null> what=RESOLVE_SERVICE
rec[5]: time=04-12 15:15:25.344 processed=EnabledState org=EnabledState dest=<null> what=23
rec[6]: time=04-12 15:15:25.358 processed=EnabledState org=EnabledState dest=<null> what=UNREGISTER_SERVICE
rec[7]: time=04-12 15:15:25.551 processed=DefaultState org=EnabledState dest=<null> what=22
After:
rec[0]: time=04-12 15:19:58.955 processed=DefaultState org=EnabledState dest=<null> what=REGISTER_CLIENT
rec[1]: time=04-12 15:19:58.958 processed=EnabledState org=EnabledState dest=<null> what=REGISTER_SERVICE
rec[2]: time=04-12 15:19:59.979 processed=EnabledState org=EnabledState dest=<null> what=DISCOVER_SERVICES
rec[3]: time=04-12 15:20:00.768 processed=EnabledState org=EnabledState dest=<null> what=MDNS_DISCOVERY_MANAGER_EVENT
rec[4]: time=04-12 15:20:00.777 processed=EnabledState org=EnabledState dest=<null> what=RESOLVE_SERVICE
rec[5]: time=04-12 15:20:00.778 processed=EnabledState org=EnabledState dest=<null> what=MDNS_DISCOVERY_MANAGER_EVENT
rec[6]: time=04-12 15:20:00.785 processed=EnabledState org=EnabledState dest=<null> what=UNREGISTER_SERVICE
rec[7]: time=04-12 15:20:00.925 processed=DefaultState org=EnabledState dest=<null> what=UNREGISTER_CLIENT
Test: adb shell dumpsys servicediscovery
Bug: 275004614
Change-Id: I9c05efc2d2993af353a2a902fd8810f53ab2cd16
diff --git a/framework-t/src/android/net/nsd/NsdManager.java b/framework-t/src/android/net/nsd/NsdManager.java
index 96f2f80..d119db6 100644
--- a/framework-t/src/android/net/nsd/NsdManager.java
+++ b/framework-t/src/android/net/nsd/NsdManager.java
@@ -281,6 +281,9 @@
EVENT_NAMES.put(UNREGISTER_SERVICE_CALLBACK, "UNREGISTER_SERVICE_CALLBACK");
EVENT_NAMES.put(UNREGISTER_SERVICE_CALLBACK_SUCCEEDED,
"UNREGISTER_SERVICE_CALLBACK_SUCCEEDED");
+ EVENT_NAMES.put(MDNS_DISCOVERY_MANAGER_EVENT, "MDNS_DISCOVERY_MANAGER_EVENT");
+ EVENT_NAMES.put(REGISTER_CLIENT, "REGISTER_CLIENT");
+ EVENT_NAMES.put(UNREGISTER_CLIENT, "UNREGISTER_CLIENT");
}
/** @hide */