Tidy up libcore.timezone APIs

Tidy up the libcore.timezone APIs to make them as close as possible to
android.timezone. In future, these classes should be repackages to be
the actual android.timezone classes, so the APIs need to be in sync.

Bug: 148086409
Test: treehugger
Change-Id: I8d0521467bb3c3c8741ce98f50cde0ee8c1bec1a
This commit is contained in:
Neil Fuller
2020-01-28 15:08:31 +00:00
parent 5c8b22657c
commit 7b54a31132

View File

@@ -48,9 +48,10 @@ public class FilteredCountryTimeZones {
mCountryTimeZones = countryTimeZones;
List<String> timeZoneIds = countryTimeZones.getTimeZoneMappings().stream()
.filter(timeZoneMapping ->
timeZoneMapping.showInPicker && (timeZoneMapping.notUsedAfter == null
|| timeZoneMapping.notUsedAfter >= MIN_USE_DATE_OF_TIMEZONE))
.map(timeZoneMapping -> timeZoneMapping.timeZoneId)
timeZoneMapping.isShownInPicker()
&& (timeZoneMapping.getNotUsedAfter() == null
|| timeZoneMapping.getNotUsedAfter() >= MIN_USE_DATE_OF_TIMEZONE))
.map(timeZoneMapping -> timeZoneMapping.getTimeZoneId())
.collect(Collectors.toList());
mTimeZoneIds = Collections.unmodifiableList(timeZoneIds);
}