Although case should not matter when comparing attributes, converting all keys to lowercase breaks NsdServiceInfo APIs which provide the original case to the caller. Use a TreeMap with a case-insensitive comparator to ignore case when querying keys, while keeping case information in the map. Bug: 270885892 Test: atest MdnsServiceInfoTest Change-Id: Id15947b1e8650eb6b59126c5d2dc8624ae4f8100