SetupWizard : Set min date to Jan 1, 2016 GMT

In the event that the current time returns us epoch,
hard code the time so the user doesn't have to
scroll all the way to 2016 when setting the time.

CRACKLING-721

Change-Id: I7a4122320c80e941154b84f306565c0f9b452a7d
(cherry picked from commit f8e4ab690f)
This commit is contained in:
Danesh M
2016-01-15 14:46:54 -08:00
committed by Abhisek Devkota
parent f5ec6ac071
commit 8f3308fbf4

View File

@@ -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() {