Change the CountryZonesFinder API for picker

The UI picker will need more information now that there
is metadata associated with TimeZoneMapping. Rather than
return just the matchng ISO codes, return all matching
CountryTimeZone objects (usually 1) so the client can
do its own filtering as needed.

Bug: 73922616
Test: CTS: run cts -m CtsLibcoreTestCases
Change-Id: I51d9de37cdab84ce1c24921fa60a84af74b12e1a
diff --git a/luni/src/main/java/libcore/util/CountryZonesFinder.java b/luni/src/main/java/libcore/util/CountryZonesFinder.java
index c630ddb..cbc8a1b 100644
--- a/luni/src/main/java/libcore/util/CountryZonesFinder.java
+++ b/luni/src/main/java/libcore/util/CountryZonesFinder.java
@@ -50,20 +50,20 @@
     }
 
     /**
-     * Returns an immutable list of country ISO codes for countries that use the specified time
-     * zone. An exact, case-sensitive match is performed on the zone ID. This method never returns
-     * null.
+     * Returns an immutable list of {@link CountryTimeZones} for countries that use the specified
+     * time zone. An exact, case-sensitive match is performed on the zone ID. This method never
+     * returns null.
      */
-    public List<String> lookupCountryCodesForZoneId(String zoneId) {
-        List<String> isoCodes = new ArrayList<>(2);
+    public List<CountryTimeZones> lookupCountryTimeZonesForZoneId(String zoneId) {
+        List<CountryTimeZones> matches = new ArrayList<>(2);
         for (CountryTimeZones countryTimeZones : countryTimeZonesList) {
             boolean match = TimeZoneMapping.containsTimeZoneId(
                     countryTimeZones.getTimeZoneMappings(), zoneId);
             if (match) {
-                isoCodes.add(countryTimeZones.getCountryIso());
+                matches.add(countryTimeZones);
             }
         }
-        return Collections.unmodifiableList(isoCodes);
+        return Collections.unmodifiableList(matches);
     }
 
     /**
diff --git a/luni/src/test/java/libcore/libcore/util/CountryZonesFinderTest.java b/luni/src/test/java/libcore/libcore/util/CountryZonesFinderTest.java
index 09fe5ac..d9e2287 100644
--- a/luni/src/test/java/libcore/libcore/util/CountryZonesFinderTest.java
+++ b/luni/src/test/java/libcore/libcore/util/CountryZonesFinderTest.java
@@ -66,14 +66,14 @@
         CountryZonesFinder countryZonesFinder =
                 CountryZonesFinder.createForTests(list(GB_ZONES, IM_ZONES, FR_ZONES, US_ZONES));
 
-        assertEqualsAndImmutable(list(GB_ZONES.getCountryIso(), IM_ZONES.getCountryIso()),
-                countryZonesFinder.lookupCountryCodesForZoneId("Europe/London"));
-        assertEqualsAndImmutable(list(US_ZONES.getCountryIso()),
-                countryZonesFinder.lookupCountryCodesForZoneId("America/New_York"));
-        assertEqualsAndImmutable(list(US_ZONES.getCountryIso()),
-                countryZonesFinder.lookupCountryCodesForZoneId("America/Los_Angeles"));
+        assertEqualsAndImmutable(list(GB_ZONES, IM_ZONES),
+                countryZonesFinder.lookupCountryTimeZonesForZoneId("Europe/London"));
+        assertEqualsAndImmutable(list(US_ZONES),
+                countryZonesFinder.lookupCountryTimeZonesForZoneId("America/New_York"));
+        assertEqualsAndImmutable(list(US_ZONES),
+                countryZonesFinder.lookupCountryTimeZonesForZoneId("America/Los_Angeles"));
         assertEqualsAndImmutable(list(),
-                countryZonesFinder.lookupCountryCodesForZoneId("DOES_NOT_EXIST"));
+                countryZonesFinder.lookupCountryTimeZonesForZoneId("DOES_NOT_EXIST"));
     }
 
     @Test