Loading src/java/com/android/internal/telephony/TimeZoneLookupHelper.java +12 −5 Original line number Original line Diff line number Diff line Loading @@ -133,11 +133,18 @@ public class TimeZoneLookupHelper { // is DST (if known). NITZ is limited in only being able to express DST offsets in whole // is DST (if known). NITZ is limited in only being able to express DST offsets in whole // hours and the DST info is optional. // hours and the DST info is optional. Integer dstAdjustmentMillis = nitzData.getDstAdjustmentMillis(); Integer dstAdjustmentMillis = nitzData.getDstAdjustmentMillis(); Boolean isDst = dstAdjustmentMillis == null ? null : dstAdjustmentMillis != 0; if (dstAdjustmentMillis == null) { Integer dstAdjustmentMillisToMatch = null; // Don't try to match the precise DST offset. return countryTimeZones.lookupByOffsetWithBias( return countryTimeZones.lookupByOffsetWithBias( nitzData.getLocalOffsetMillis(), isDst, dstAdjustmentMillisToMatch, nitzData.getCurrentTimeInMillis(), bias, nitzData.getLocalOffsetMillis()); nitzData.getCurrentTimeInMillis(), bias); } 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); } } } /** /** Loading Loading
src/java/com/android/internal/telephony/TimeZoneLookupHelper.java +12 −5 Original line number Original line Diff line number Diff line Loading @@ -133,11 +133,18 @@ public class TimeZoneLookupHelper { // is DST (if known). NITZ is limited in only being able to express DST offsets in whole // is DST (if known). NITZ is limited in only being able to express DST offsets in whole // hours and the DST info is optional. // hours and the DST info is optional. Integer dstAdjustmentMillis = nitzData.getDstAdjustmentMillis(); Integer dstAdjustmentMillis = nitzData.getDstAdjustmentMillis(); Boolean isDst = dstAdjustmentMillis == null ? null : dstAdjustmentMillis != 0; if (dstAdjustmentMillis == null) { Integer dstAdjustmentMillisToMatch = null; // Don't try to match the precise DST offset. return countryTimeZones.lookupByOffsetWithBias( return countryTimeZones.lookupByOffsetWithBias( nitzData.getLocalOffsetMillis(), isDst, dstAdjustmentMillisToMatch, nitzData.getCurrentTimeInMillis(), bias, nitzData.getLocalOffsetMillis()); nitzData.getCurrentTimeInMillis(), bias); } 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); } } } /** /** Loading