Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d046fb26 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Track changes to CountryTimeZones API" am: 28b12c34 am: c30eabfa am: f19b9eec

am: b82115be

Change-Id: I337c1c16966087cc89b9717e2cd4904d18c5e2bc
parents 67949695 b82115be
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -67,20 +67,19 @@ public class TimeUtils {
     * found.
     */
    private static android.icu.util.TimeZone getIcuTimeZone(
            int offset, boolean dst, long when, String country) {
        if (country == null) {
            int offsetMillis, boolean isDst, long whenMillis, String countryIso) {
        if (countryIso == null) {
            return null;
        }

        android.icu.util.TimeZone bias = android.icu.util.TimeZone.getDefault();
        CountryTimeZones countryTimeZones =
                TimeZoneFinder.getInstance().lookupCountryTimeZones(country);
                TimeZoneFinder.getInstance().lookupCountryTimeZones(countryIso);
        if (countryTimeZones == null) {
            return null;
        }

        CountryTimeZones.OffsetResult offsetResult =
                countryTimeZones.lookupByOffsetWithBias(offset, dst, when, bias);
        CountryTimeZones.OffsetResult offsetResult = countryTimeZones.lookupByOffsetWithBias(
                offsetMillis, isDst, null /* dstOffsetMillis */, whenMillis, bias);
        return offsetResult != null ? offsetResult.mTimeZone : null;
    }