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

Commit 8e28e556 authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Avoid a @Nullable Boolean"

parents 11cda4d9 62274ef1
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -133,11 +133,18 @@ public class TimeZoneLookupHelper {
        // is DST (if known). NITZ is limited in only being able to express DST offsets in whole
        // hours and the DST info is optional.
        Integer dstAdjustmentMillis = nitzData.getDstAdjustmentMillis();
        Boolean isDst = dstAdjustmentMillis == null ? null : dstAdjustmentMillis != 0;
        Integer dstAdjustmentMillisToMatch = null; // Don't try to match the precise DST offset.
        if (dstAdjustmentMillis == null) {
            return countryTimeZones.lookupByOffsetWithBias(
                nitzData.getLocalOffsetMillis(), isDst, dstAdjustmentMillisToMatch,
                nitzData.getCurrentTimeInMillis(), bias);
                    nitzData.getCurrentTimeInMillis(), bias, nitzData.getLocalOffsetMillis());

        } else {
            // We don't try to match the exact DST offset given, we just use it to work out if
            // the country is in DST.
            boolean isDst = dstAdjustmentMillis != 0;
            return countryTimeZones.lookupByOffsetWithBias(
                    nitzData.getCurrentTimeInMillis(), bias,
                    nitzData.getLocalOffsetMillis(), isDst);
        }
    }

    /**