diff options
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup/DateTimePage.java')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/DateTimePage.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java index 15cfdca..7a5922b 100644 --- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java +++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java @@ -188,6 +188,18 @@ public class DateTimePage extends SetupPage { }); } }); + // Pre-select current/default date if epoch + mHandler.post(new Runnable() { + @Override + public void run() { + final Calendar calendar = Calendar.getInstance(); + final boolean isEpoch = calendar.get(Calendar.YEAR) == 1970; + if (isEpoch) { + // If epoch, set date to a default date + setDate(getActivity(), 2016, Calendar.JANUARY, 1); + } + } + }); } private void showDatePicker() { |