From 7b54a3113290c42e095a3933d087b4540a95e19f Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Tue, 28 Jan 2020 15:08:31 +0000 Subject: [PATCH] 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 --- .../datetime/timezone/model/FilteredCountryTimeZones.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java b/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java index d7fcb2f95c6..92e9e96dc81 100644 --- a/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java +++ b/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java @@ -48,9 +48,10 @@ public class FilteredCountryTimeZones { mCountryTimeZones = countryTimeZones; List 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); }