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
diff --git a/core/java/android/app/timedetector/TimeDetectorHelper.java b/core/java/android/app/timedetector/TimeDetectorHelper.java
index 8752ee0..04f72de 100644
--- a/core/java/android/app/timedetector/TimeDetectorHelper.java
+++ b/core/java/android/app/timedetector/TimeDetectorHelper.java
@@ -37,7 +37,7 @@
* 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 @@
/** 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.