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

Commit ae911cc9 authored by Neil Fuller's avatar Neil Fuller
Browse files

Change the allowed lower bound for date changes

Change the allowed lower bound for date changes to 2015. The previous
lower bound of 2007/2008 is a long time ago. This is most likely to
affect automated / manual tests, not real user needs: real users should
have no need to set the clock that far back, and may cause TLS issues if
they do.

This is primarily a proof of concept and can be rolled back easily if
needed. No CTS tests for these bounds are planned.

Bug: 228967927
Test: build only / manual inspection of SettingsUI
Change-Id: I9b8ba632038c7d02d630f96da27303f5d0d109fc
parent 13415197
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public class TimeDetectorHelper {
     * See {@link #getManualDateSelectionYearMin()}. Chosen to produce Unix epoch times be greater
     * than {@link #MANUAL_SUGGESTION_LOWER_BOUND}.
     */
    private static final int MANUAL_SUGGESTION_YEAR_MIN = 2008;
    private static final int MANUAL_SUGGESTION_YEAR_MIN = 2015;

    /**
     * The maximum gregorian calendar year to allow for manual date selection on devices unlikely to
@@ -80,7 +80,7 @@ public class TimeDetectorHelper {

    /** See {@link #getManualSuggestionLowerBound()}. */
    private static final Instant MANUAL_SUGGESTION_LOWER_BOUND =
            Instant.ofEpochMilli(1194220800000L); // Nov 5, 2007, 0:00 UTC
            Instant.ofEpochMilli(1415491200000L); // Nov 5, 2014, 0:00 UTC

    /**
     * The lowest value in Unix epoch milliseconds that is considered a valid automatic suggestion.